summaryrefslogtreecommitdiff
path: root/overlays/persistent-nix-shell/default.nix
blob: 603963353a577fd8342cb65e95ca7a4feddf5236 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
final: prev: {
  persistent-nix-shell = prev.stdenv.mkDerivation {
    name = "persistent-nix-shell";
    src = ./persistent-nix-shell;

    phases = [ "buildPhase" "installPhase" ];

    inherit (final) zsh;

    buildPhase = ''
      substituteAll $src persistent-nix-shell
    '';

    installPhase = ''
      install -m 0755 -D -t $out/bin \
        persistent-nix-shell
    '';
  };
}