default.nix (535B)
1 { stdenv 2 , fetchFromGitHub 3 , csv-delim 4 , bc 5 }: 6 stdenv.mkDerivation rec { 7 name = "csv-scripts-${version}"; 8 version = "0.2.6"; 9 10 buildInputs = [ csv-delim bc ]; 11 12 src = fetchFromGitHub { 13 owner = "jb55"; 14 repo = "csv-scripts"; 15 rev = version; 16 sha256 = "1w5jf0w376kmaqpy59lw32z1lawh5ak7b0lf79bbslg8ccwb8y7r"; 17 }; 18 19 patchPhase = '' 20 for file in "bin/"*; do 21 sed -i 's,csv-delim,${csv-delim}/bin/csv-delim,g' "$file" 22 done; 23 sed -i 's,bc,${bc}/bin/bc,' bin/csv-sum 24 ''; 25 26 makeFlags = "PREFIX=$(out)"; 27 }