nixpkgs/pkgs/development/compilers/souffle/default.nix
Patrick Hilhorst 593e11fd94
treewide: fix redirected urls
According to https://repology.org/repository/nix_unstable/problems, we have a
lot of packages that have http links that redirect to https as their homepage.
This commit updates all these packages to use the https links as their
homepage.

The following script was used to make these updates:

```

curl https://repology.org/api/v1/repository/nix_unstable/problems \
    | jq '.[] | .problem' -r \
    | rg 'Homepage link "(.+)" is a permanent redirect to "(.+)" and should be updated' --replace 's@$1@$2@' \
    | sort | uniq > script.sed

find -name '*.nix' | xargs -P4 -- sed -f script.sed -i
```
2020-01-22 11:26:22 +01:00

54 lines
1.6 KiB
Nix

{ stdenv, fetchFromGitHub
, perl, ncurses, zlib, sqlite, libffi
, autoreconfHook, mcpp, bison, flex, doxygen, graphviz
, makeWrapper
}:
let
toolsPath = stdenv.lib.makeBinPath [ mcpp ];
in
stdenv.mkDerivation rec {
pname = "souffle";
version = "1.7.1";
src = fetchFromGitHub {
owner = "souffle-lang";
repo = "souffle";
rev = version;
sha256 = "0px8kh5875q2iyza4ylpa6vxpy6qxg0qvn2idk1j6dcdf5pdryph";
};
nativeBuildInputs = [ autoreconfHook bison flex mcpp doxygen graphviz makeWrapper perl ];
buildInputs = [ ncurses zlib sqlite libffi ];
# these propagated inputs are needed for the compiled Souffle mode to work,
# since generated compiler code uses them. TODO: maybe write a g++ wrapper
# that adds these so we can keep the propagated inputs clean?
propagatedBuildInputs = [ ncurses zlib sqlite libffi ];
# see 565a8e73e80a1bedbb6cc037209c39d631fc393f and parent commits upstream for
# Wno-error fixes
patchPhase = ''
substituteInPlace ./src/Makefile.am \
--replace '-Werror' '-Werror -Wno-error=deprecated -Wno-error=other'
substituteInPlace configure.ac \
--replace "m4_esyscmd([git describe --tags --always | tr -d '\n'])" "${version}"
'';
postInstall = ''
wrapProgram "$out/bin/souffle" --prefix PATH : "${toolsPath}"
'';
outputs = [ "out" ];
meta = with stdenv.lib; {
description = "A translator of declarative Datalog programs into the C++ language";
homepage = "https://souffle-lang.github.io/";
platforms = platforms.unix;
maintainers = with maintainers; [ thoughtpolice copumpkin wchresta ];
license = licenses.upl;
};
}