Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 57 lines 1.9 kB view raw
1{ 2 lib, 3 stdenv, 4 rustPlatform, 5 fetchCrate, 6 git, 7}: 8 9rustPlatform.buildRustPackage rec { 10 pname = "fac-build"; 11 version = "0.5.4"; 12 13 src = fetchCrate { 14 inherit version; 15 crateName = "fac"; 16 hash = "sha256-+JJVuKUdnjJoQJ4a2EE0O6jZdVoFxPwbPgfD2LfiDPI="; 17 }; 18 19 cargoHash = "sha256-+2j6xH1Ww1WOLfbjknUPvCmYLAl4W3Zp/mQTaL0qnv0="; 20 21 # fac includes a unit test called ls_files_works which assumes it's 22 # running in a git repo. Nix's sandbox runs cargo build outside git, 23 # so this test won't work. 24 checkFlags = [ "--skip=ls_files_works" ]; 25 26 # fac calls git at runtime, expecting it to be in the PATH, 27 # so we need to patch it to call git by absolute path instead. 28 postPatch = '' 29 substituteInPlace src/git.rs \ 30 --replace 'std::process::Command::new("git")' \ 31 'std::process::Command::new("${git}/bin/git")' 32 substituteInPlace tests/lib.rs \ 33 --replace 'std::process::Command::new("git")' \ 34 'std::process::Command::new("${git}/bin/git")' 35 ''; 36 37 meta = with lib; { 38 broken = (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64); 39 description = '' 40 A build system that uses ptrace to handle dependencies automatically 41 ''; 42 longDescription = '' 43 Fac is a general-purpose build system inspired by make that utilizes 44 ptrace to ensure that all dependences are enumerated and that all 45 source files are added to a (git) repo. An important feature of fac 46 is that it automatically handles dependencies, rather than either 47 complaining about them or giving an incorrect build. Currently, fac 48 only runs on linux systems, but on those systems it is incredibly 49 easy to use! 50 ''; 51 homepage = "https://physics.oregonstate.edu/~roundyd/fac"; 52 license = licenses.gpl2Plus; 53 platforms = platforms.unix; 54 maintainers = with maintainers; [ dpercy ]; 55 mainProgram = "fac"; 56 }; 57}