summaryrefslogtreecommitdiff
path: root/overlays/persistent-nix-shell/default.nix
blob: c36b9e864bb5d0dcc960934f158668b2165f46d0 (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
    '';
  };
}