Files
vmimages/pkgs/wsl-ssh-agent-relay/default.nix
2023-02-23 09:43:30 -05:00

27 lines
728 B
Nix

{ lib, stdenv, pkgs }:
stdenv.mkDerivation rec {
name = "wsl-ssh-agent-relay";
version = "0.1";
src = ./wsl-ssh-agent-relay.sh;
nativeBuildInputs = [pkgs.makeWrapper];
# phases = ["installPhase" ];
unpackCmd = ''
# $curSrc is the variable that contains the path to our source.
mkdir wsl-ssh-agent-relay-src
# We rename the file here, because when nix adds files to the
# store it adds a hash, which obviously we don't want for our
# shell script.
cp $curSrc wsl-ssh-agent-relay-src/wsl-ssh-agent-relay
'';
installPhase = ''
install -Dm755 wsl-ssh-agent-relay $out/bin/wsl-ssh-agent-relay
wrapProgram $out/bin/wsl-ssh-agent-relay --prefix PATH : $out/bin
'';
}