1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-25 03:17:13 +00:00
nixpkgs/pkgs/applications/science/logic/cedille/default.nix

71 lines
1.8 KiB
Nix
Raw Normal View History

2019-04-29 20:02:44 +01:00
{ stdenv
, lib
, fetchFromGitHub
, fetchpatch
, texinfo
, alex
, happy
, Agda
, buildPlatform
, buildPackages
, ghcWithPackages
}:
2018-10-12 22:22:25 +01:00
stdenv.mkDerivation rec {
2019-04-29 20:02:44 +01:00
version = "1.1.1";
pname = "cedille";
2018-10-12 22:22:25 +01:00
src = fetchFromGitHub {
owner = "cedille";
repo = "cedille";
rev = "v${version}";
2019-04-29 20:02:44 +01:00
sha256 = "17j7an5bharc8q1pj06615zmflipjdd0clf67cnfdhsmqwzf6l9r";
fetchSubmodules = true;
2018-10-12 22:22:25 +01:00
};
2019-04-29 20:02:44 +01:00
nativeBuildInputs = [ texinfo alex happy ];
buildInputs = [ Agda (ghcWithPackages (ps: [ps.ieee])) ];
2018-10-12 22:22:25 +01:00
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE =
lib.optionalString (buildPlatform.libc == "glibc")
"${buildPackages.glibcLocales}/lib/locale/locale-archive";
2019-04-29 20:02:44 +01:00
patches = [
# texinfo direntry fix. See: https://github.com/cedille/cedille/pull/86
(fetchpatch {
url = "https://github.com/cedille/cedille/commit/c058f42179a635c7b6179772c30f0eba4ac53724.patch";
sha256 = "02qd86k5bdrygjzh2k0j0q5qk4nk2vwnsz7nvlssvysbvsmiba7x";
})
];
2018-10-12 22:22:25 +01:00
postPatch = ''
patchShebangs create-libraries.sh
2019-04-29 20:02:44 +01:00
patchShebangs docs/src/compile-docs.sh
2018-10-12 22:22:25 +01:00
'';
2019-04-29 20:02:44 +01:00
# We regenerate the info file in order to fix the direntry
preBuild = ''
rm -f docs/info/cedille-info-main.info
'';
buildFlags = [ "all" "cedille-docs" ];
2018-10-12 22:22:25 +01:00
installPhase = ''
2019-04-29 20:02:44 +01:00
install -Dm755 -t $out/bin/ cedille
install -Dm755 -t $out/bin/ core/cedille-core
install -Dm644 -t $out/share/info docs/info/cedille-info-main.info
mkdir -p $out/lib/
cp -r lib/ $out/lib/cedille/
2018-10-12 22:22:25 +01:00
'';
2019-04-29 20:02:44 +01:00
meta = with stdenv.lib; {
description = "An interactive theorem-prover and dependently typed programming language, based on extrinsic (aka Curry-style) type theory";
2018-10-12 22:22:25 +01:00
homepage = https://cedille.github.io/;
2019-04-29 20:02:44 +01:00
license = licenses.mit;
maintainers = with maintainers; [ marsam mpickering ];
platforms = platforms.unix;
2018-10-12 22:22:25 +01:00
};
}