diff options
author | David Percy <dpercy@dpercy.dev> | 2020-09-15 21:19:44 -0400 |
---|---|---|
committer | David Percy <dpercy@dpercy.dev> | 2020-09-15 21:23:24 -0400 |
commit | 16beff405dd78a96b1f61d92195d87f1d32da68c (patch) | |
tree | bbad545d46b7f312addfe9d3eae52a30318d9686 /pkgs/development/tools/build-managers/fac/default.nix | |
parent | deb412f54f838a3425cfdd2d42d9fce6650e99f5 (diff) | |
download | nixpkgs-16beff405dd78a96b1f61d92195d87f1d32da68c.tar nixpkgs-16beff405dd78a96b1f61d92195d87f1d32da68c.tar.gz nixpkgs-16beff405dd78a96b1f61d92195d87f1d32da68c.tar.bz2 nixpkgs-16beff405dd78a96b1f61d92195d87f1d32da68c.tar.lz nixpkgs-16beff405dd78a96b1f61d92195d87f1d32da68c.tar.xz nixpkgs-16beff405dd78a96b1f61d92195d87f1d32da68c.tar.zst nixpkgs-16beff405dd78a96b1f61d92195d87f1d32da68c.zip |
fac-build: init at 0.5.3
Diffstat (limited to 'pkgs/development/tools/build-managers/fac/default.nix')
-rw-r--r-- | pkgs/development/tools/build-managers/fac/default.nix | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/development/tools/build-managers/fac/default.nix b/pkgs/development/tools/build-managers/fac/default.nix new file mode 100644 index 00000000000..8c41eb3ac51 --- /dev/null +++ b/pkgs/development/tools/build-managers/fac/default.nix @@ -0,0 +1,50 @@ +{ stdenv, git, fetchFromGitHub, rustPlatform }: + +rustPlatform.buildRustPackage rec { + pname = "fac-build"; + version = "0.5.3"; + + src = fetchFromGitHub { + owner = "droundy"; + repo = "fac"; + rev = version; + sha256 = "1gifrlb31jy8633rnhny58ccp3wlmd338129c6sh0h1a38vkmsxk"; + }; + + # workaround for missing Cargo.lock file + cargoPatches = [ ./cargo-lock.patch ]; + + cargoSha256 = "0hjfq61y1ikdcajr2k514k7fad2zxbwq7yb5nk1wx38f1524709q"; + + # fac includes a unit test called ls_files_works which assumes it's + # running in a git repo. Nix's sandbox runs cargo build outside git, + # so this test won't work. + checkFlagsArray = [ "--skip=ls_files_works" ]; + + # fac calls git at runtime, expecting it to be in the PATH, + # so we need to patch it to call git by absolute path instead. + postPatch = '' + substituteInPlace src/git.rs \ + --replace 'std::process::Command::new("git")' \ + 'std::process::Command::new("${git}/bin/git")' + ''; + + meta = with stdenv.lib; { + description = '' + A build system that uses ptrace to handle dependencies automatically + ''; + longDescription = '' + Fac is a general-purpose build system inspired by make that utilizes + ptrace to ensure that all dependences are enumerated and that all + source files are added to a (git) repo. An important feature of fac + is that it automatically handles dependencies, rather than either + complaining about them or giving an incorrect build. Currently, fac + only runs on linux systems, but on those systems it is incredibly + easy to use! + ''; + homepage = "https://physics.oregonstate.edu/~roundyd/fac"; + license = licenses.gpl2Plus; + platforms = platforms.linux; + maintainers = [ maintainers.dpercy ]; + }; +} |