2015-07-11 14:55:22 +00:00
|
|
|
{ lib, pkgs, ... }:
|
|
|
|
|
2015-07-28 19:00:53 +00:00
|
|
|
let
|
2015-07-28 19:38:22 +00:00
|
|
|
krebs = import ../../krebs/4lib { inherit lib; };
|
2015-07-28 19:00:53 +00:00
|
|
|
in
|
2015-07-11 14:55:22 +00:00
|
|
|
|
2015-07-28 19:00:53 +00:00
|
|
|
with krebs;
|
|
|
|
|
|
|
|
krebs // rec {
|
2015-07-11 14:55:22 +00:00
|
|
|
|
|
|
|
git = import ./git.nix {
|
2015-07-28 19:00:53 +00:00
|
|
|
lib = krebs;
|
|
|
|
inherit pkgs;
|
2015-07-11 14:55:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# "7.4.335" -> "74"
|
|
|
|
majmin = with lib; x : concatStrings (take 2 (splitString "." x));
|
|
|
|
|
|
|
|
shell-escape =
|
|
|
|
let
|
|
|
|
isSafeChar = c: match "[-./0-9_a-zA-Z]" c != null;
|
|
|
|
in
|
|
|
|
stringAsChars (c:
|
|
|
|
if isSafeChar c then c
|
|
|
|
else if c == "\n" then "'\n'"
|
|
|
|
else "\\${c}");
|
|
|
|
}
|