summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/genid.nix
diff options
context:
space:
mode:
authortv <tv@shackspace.de>2015-08-29 00:36:50 +0200
committertv <tv@shackspace.de>2015-08-29 00:36:50 +0200
commit22a171f3e0405d504e8c8c3b32f73a8087a5ed66 (patch)
tree12d41954273e34f06cfbcf6e12f7fb64c7db2b4d /krebs/5pkgs/genid.nix
parent09257f97823e9a57cda749c2d5a69b18ef484cec (diff)
krebs pkgs += charybdis lentil much
While there, put everything into subdirectories.
Diffstat (limited to 'krebs/5pkgs/genid.nix')
-rw-r--r--krebs/5pkgs/genid.nix22
1 files changed, 0 insertions, 22 deletions
diff --git a/krebs/5pkgs/genid.nix b/krebs/5pkgs/genid.nix
deleted file mode 100644
index c75bec317..000000000
--- a/krebs/5pkgs/genid.nix
+++ /dev/null
@@ -1,22 +0,0 @@
-{ lib, pkgs, ... }:
-
-pkgs.writeScriptBin "genid" ''
- #! /bin/sh
- # usage: genid NAME
- set -euf
-
- export PATH=${lib.makeSearchPath "bin" (with pkgs; [
- bc
- coreutils
- ])}
-
- name=$1
- hash=$(printf %s "$name" | sha1sum | cut -d\ -f1 | tr a-f A-F)
- echo "
- min=2^24 # bigger than nobody and nogroup, see <nixos/modules/misc/ids.nix>
- # and some spare for stuff like lxd.
- max=2^32 # see 2^(8*sizeof(uid_t))
- ibase=16
- ($hash + min) % max
- " | bc
-''