nixpkgs/pkgs/applications/science/logic/cedille/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

57 lines
1.3 KiB
Nix

{ stdenv
, lib
, fetchFromGitHub
, alex
, happy
, Agda
, buildPlatform
, buildPackages
, ghcWithPackages
}:
stdenv.mkDerivation rec {
version = "1.1.2";
pname = "cedille";
src = fetchFromGitHub {
owner = "cedille";
repo = "cedille";
rev = "v${version}";
sha256 = "1j745q9sd32fhcb96wjq6xvyqq1k6imppjnya6x0n99fyfnqzvg9";
fetchSubmodules = true;
};
patches = [
./Fix-to-string.agda-to-compile-with-Agda-2.6.1.patch
];
nativeBuildInputs = [ alex happy ];
buildInputs = [ Agda (ghcWithPackages (ps: [ps.ieee])) ];
LANG = "en_US.UTF-8";
LOCALE_ARCHIVE =
lib.optionalString (buildPlatform.libc == "glibc")
"${buildPackages.glibcLocales}/lib/locale/locale-archive";
postPatch = ''
patchShebangs create-libraries.sh
'';
installPhase = ''
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/
'';
meta = with lib; {
description = "An interactive theorem-prover and dependently typed programming language, based on extrinsic (aka Curry-style) type theory";
homepage = "https://cedille.github.io/";
license = licenses.mit;
maintainers = with maintainers; [ marsam mpickering ];
platforms = platforms.unix;
};
}