summaryrefslogtreecommitdiffstats
path: root/Zpkgs/tv/genid.nix
diff options
context:
space:
mode:
authorlassulus <lass@aidsballs.de>2015-07-27 10:09:13 +0200
committerlassulus <lass@aidsballs.de>2015-07-27 10:09:13 +0200
commitbfc33453e972d643a5f78187812add30550c8f3f (patch)
treef2c86d609106856ef92c605dc11da222132d1aaa /Zpkgs/tv/genid.nix
parent09031485dcea56d5207f7c668c5cec6830a588d5 (diff)
parentdc9b0d7ce100c1286353e1ce3a8b11c42e48738d (diff)
Merge branch 'tv' into master
Diffstat (limited to 'Zpkgs/tv/genid.nix')
-rw-r--r--Zpkgs/tv/genid.nix22
1 files changed, 0 insertions, 22 deletions
diff --git a/Zpkgs/tv/genid.nix b/Zpkgs/tv/genid.nix
deleted file mode 100644
index c75bec3..0000000
--- a/Zpkgs/tv/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
-''