summaryrefslogtreecommitdiff
path: root/hosts/ades/thin-shim.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/ades/thin-shim.nix')
-rw-r--r--hosts/ades/thin-shim.nix41
1 files changed, 0 insertions, 41 deletions
diff --git a/hosts/ades/thin-shim.nix b/hosts/ades/thin-shim.nix
deleted file mode 100644
index a9f931b..0000000
--- a/hosts/ades/thin-shim.nix
+++ /dev/null
@@ -1,41 +0,0 @@
-pkgs:
-let
- inherit (builtins)
- map elem;
-
- inherit (pkgs) stdenv;
-in
-pkg: inst:
-stdenv.mkDerivation {
- pname = pkg.pname + "-shim";
- version = pkg.version;
- nativeBuildInputs = [pkg];
- dontUnpack = true;
- buildPhase = ''
-if [ -d ${pkg}/bin ]; then
- mkdir -p "$out/bin"
- for exe in $(ls "${pkg}/bin/"); do
- cat >"$out/bin/$exe" <<EOF
-#!/bin/sh
-
-term=urxvt
-which \$term >/dev/null 2>&1 || term=xterm
-
-if [ "\$DISPLAY" ]; then
- \$term -e nix shell '${inst}' --command '$exe' \$*
-else
- nix shell '${inst}' --command '$exe' \$*
-fi
-EOF
- chmod +x "$out/bin/$exe"
- done
-fi
-
-for dir in "share/applications" "share/icons"; do
- if [ -d "${pkg}/$dir" ]; then
- mkdir -p "$out/$dir"
- cp -a "${pkg}/$dir/"* "$out/$dir"
- fi
-done
-'';
-}