Fil-C on Nix

Filnix wiki

mbrock/filnix

packages/projeny.nix

λlib, stdenv, fetchgit, makeWrapper, coreutils, gnutar, gzip, bzip2, xz, zstd, curl, git, patch, python3
let
18upstream=
builtins.fromJSONbuiltins.readFile../ports/upstream.json
in
stdenv.mkDerivation
21pname=
"projeny"
22version=
"0-unstable-${builtins.substring0 12 upstream.projenyRev}"
23src=
24name=
"projeny-src"
25url=
"https://github.com/pizlonator/fil-c"
26rev=
upstream.projenyRev
27sparseCheckout=
"/projects/projeny/"
28nonConeMode=
true
29hash=
upstream.projenyHash
31sourceRoot=
"projeny-src/projects/projeny"
32nativeBuildInputs=

URL: headers are downloaded with libcurl.

34buildInputs=
45enableParallelBuilding=
true

Darwin's struct stat names the timespec st_mtimespec.

47env=
lib.optionalAttrsstdenv.hostPlatform.isDarwin NIX_CFLAGS_COMPILE = "-Dst_mtim=st_mtimespec";

The test harness keeps command output in a shell variable named out; exported, as Nix exports it, a large diff overflowed every child's environment (E2BIG).

53preCheck=
patchShebangs tests
export -n out
57postCheck=
"export out"

Three tests expect Linux behavior: two symlink-escape patches that should fail and the error message for an unremovable status file.

60doCheck=
¬stdenv.hostPlatform.isDarwin
61checkTarget=
"test"
62installPhase=
runHook preInstall
install -Dm755 projeny $out/bin/projeny
wrapProgram $out/bin/projeny --prefix PATH : ${lib.makeBinPathcoreutils gnutar gzip bzip2 xz zstd}
runHook postInstall
77meta=
78description=

Project tarball and patch manager from Fil-C

79homepage=
"https://github.com/pizlonator/fil-c/tree/deluge/projects/projeny"
80license=
lib.licenses.bsd2
81mainProgram=
"projeny"
82platforms=
lib.platforms.unix