nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 63 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 perl, 6 which, 7 openssl, 8 sqlite, 9}: 10 11# Instead of writing directly into $HOME, we change the default db location 12# from $HOME/.dupd_sqlite to $HOME/.cache/dupd.sqlite3 13 14stdenv.mkDerivation (finalAttrs: { 15 pname = "dupd"; 16 version = "1.7.3"; 17 18 src = fetchFromGitHub { 19 owner = "jvirkki"; 20 repo = "dupd"; 21 rev = finalAttrs.version; 22 sha256 = "sha256-ZiQroJ5fjBCIjU+M8KRA0N3Mrg9h0NVtfYUIS4cYyhw="; 23 }; 24 25 postPatch = '' 26 patchShebangs tests 27 28 # tests need HOME to write the database 29 export HOME=$TMPDIR 30 31 mkdir -p $HOME/.cache 32 33 for f in man/dupd man/dupd.1 src/main.c tests/test.56 tests/test.57 ; do 34 substituteInPlace $f --replace .dupd_sqlite .cache/dupd.sqlite3 35 done 36 ''; 37 38 buildInputs = [ 39 openssl 40 sqlite 41 ]; 42 43 nativeBuildInputs = [ 44 perl 45 which 46 ]; 47 48 makeFlags = [ 49 "INSTALL_PREFIX=$(out)" 50 ]; 51 52 enableParallelBuilding = true; 53 54 doCheck = true; 55 56 meta = { 57 description = "CLI utility to find duplicate files"; 58 homepage = "http://www.virkki.com/dupd"; 59 license = lib.licenses.gpl3; 60 maintainers = with lib.maintainers; [ peterhoeg ]; 61 mainProgram = "dupd"; 62 }; 63})