···7373 # Get the commit id of a git repo
7474 # Example: commitIdFromGitRepo <nixpkgs/.git>
7575 commitIdFromGitRepo =
7676- let readCommitFromFile = path: file:
7676+ let readCommitFromFile = file: path:
7777 with builtins;
7878 let fileName = toString path + "/" + file;
7979 packedRefsName = toString path + "/packed-refs";
···8585 matchRef = match "^ref: (.*)$" fileContent;
8686 in if isNull matchRef
8787 then fileContent
8888- else readCommitFromFile path (lib.head matchRef)
8888+ else readCommitFromFile (lib.head matchRef) path
8989 # Sometimes, the file isn't there at all and has been packed away in the
9090 # packed-refs file, so we have to grep through it:
9191 else if lib.pathExists packedRefsName
···9696 then throw ("Could not find " + file + " in " + packedRefsName)
9797 else lib.head matchRef
9898 else throw ("Not a .git directory: " + path);
9999- in lib.flip readCommitFromFile "HEAD";
9999+ in readCommitFromFile "HEAD";
100100101101 pathHasContext = builtins.hasContext or (lib.hasPrefix builtins.storeDir);
102102
···11{ stdenv, fetchsvn, fetchurl, cups, cups-filters, jbigkit, zlib }:
2233let
44- rev = "315";
5465 color-profiles = stdenv.mkDerivation {
76 name = "splix-color-profiles-20070625";
···1918 '';
2019 };
21202222-in stdenv.mkDerivation {
2121+in stdenv.mkDerivation rec {
2322 name = "splix-svn-${rev}";
2323+ rev = "315";
24242525 src = fetchsvn {
2626 # We build this from svn, because splix hasn't been in released in several years
2727 # although the community has been adding some new printer models.
2828 url = "svn://svn.code.sf.net/p/splix/code/splix";
2929- rev = "r${rev}";
2929+ inherit rev;
3030 sha256 = "16wbm4xnz35ca3mw2iggf5f4jaxpyna718ia190ka6y4ah932jxl";
3131 };
3232