krebs krops: use upstream writers
This commit is contained in:
parent
dc7155be6c
commit
cd268ca249
@ -31,18 +31,19 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
stockholm.file = toString ../.;
|
stockholm.file = toString ../.;
|
||||||
stockholm-version.pipe = toString (pkgs.writeDash "${name}-version" ''
|
stockholm-version.pipe =
|
||||||
set -efu
|
toString (pkgs.writers.writeDash "${name}-version" ''
|
||||||
cd ${lib.escapeShellArg stockholm.file}
|
set -efu
|
||||||
V=$(${pkgs.coreutils}/bin/date +%y.%m)
|
cd ${lib.escapeShellArg stockholm.file}
|
||||||
if test -d .git; then
|
V=$(${pkgs.coreutils}/bin/date +%y.%m)
|
||||||
V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty)
|
if test -d .git; then
|
||||||
case $V in (*-dirty)
|
V=$V.git.$(${pkgs.git}/bin/git describe --always --dirty)
|
||||||
V=$V@''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)}
|
case $V in (*-dirty)
|
||||||
esac
|
V=$V@''${HOSTNAME-$(${pkgs.nettools}/bin/hostname)}
|
||||||
fi
|
esac
|
||||||
printf %s "$V"
|
fi
|
||||||
'');
|
printf %s "$V"
|
||||||
|
'');
|
||||||
};
|
};
|
||||||
|
|
||||||
source ={ test }: lib.evalSource [
|
source ={ test }: lib.evalSource [
|
||||||
|
Loading…
Reference in New Issue
Block a user