1 { lib, stdenv, rustPlatform, fetchCrate, git, CoreServices }:
3 rustPlatform.buildRustPackage rec {
10 sha256 = "sha256-+JJVuKUdnjJoQJ4a2EE0O6jZdVoFxPwbPgfD2LfiDPI=";
14 buildInputs = lib.optionals stdenv.isDarwin [ CoreServices ];
15 cargoSha256 = "sha256-XT4FQVE+buORuZAFZK5Qnf/Fl3QSvw4SHUuCzWhxUdk=";
17 # fac includes a unit test called ls_files_works which assumes it's
18 # running in a git repo. Nix's sandbox runs cargo build outside git,
19 # so this test won't work.
20 checkFlagsArray = [ "--skip=ls_files_works" ];
22 # fac calls git at runtime, expecting it to be in the PATH,
23 # so we need to patch it to call git by absolute path instead.
25 substituteInPlace src/git.rs \
26 --replace 'std::process::Command::new("git")' \
27 'std::process::Command::new("${git}/bin/git")'
28 substituteInPlace tests/lib.rs \
29 --replace 'std::process::Command::new("git")' \
30 'std::process::Command::new("${git}/bin/git")'
34 broken = (stdenv.isLinux && stdenv.isAarch64);
36 A build system that uses ptrace to handle dependencies automatically
39 Fac is a general-purpose build system inspired by make that utilizes
40 ptrace to ensure that all dependences are enumerated and that all
41 source files are added to a (git) repo. An important feature of fac
42 is that it automatically handles dependencies, rather than either
43 complaining about them or giving an incorrect build. Currently, fac
44 only runs on linux systems, but on those systems it is incredibly
47 homepage = "https://physics.oregonstate.edu/~roundyd/fac";
48 license = licenses.gpl2Plus;
49 platforms = platforms.unix;
50 maintainers = with maintainers; [ dpercy ];