2021-02-05 17:12:51 +00:00
|
|
|
{ lib, git, fetchFromGitHub, rustPlatform }:
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
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 ];
|
|
|
|
|
2021-05-28 09:39:13 +00:00
|
|
|
cargoSha256 = "033wif3wwm3912ppw0gshsyjxipilg9hhvkijw29zmjfm6074b21";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
# 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")'
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
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 ];
|
|
|
|
};
|
|
|
|
}
|