mirror of
https://github.com/sstent/vmimages.git
synced 2025-12-06 06:01:51 +00:00
27 lines
756 B
Nix
27 lines
756 B
Nix
{ lib, stdenv, pkgs }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "wsl-ssh-agent-forward";
|
|
version = "0.1";
|
|
src = ./wsl-ssh-agent-forward.sh;
|
|
nativeBuildInputs = [pkgs.makeWrapper];
|
|
# phases = ["installPhase" ];
|
|
unpackCmd = ''
|
|
# $curSrc is the variable that contains the path to our source.
|
|
mkdir wsl-ssh-agent-forward-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-forward-src/wsl-ssh-agent-forward.sh
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -Dm755 wsl-ssh-agent-forward.sh $out/bin/wsl-ssh-agent-forward.sh
|
|
wrapProgram $out/bin/wsl-ssh-agent-forward.sh --prefix PATH : $out/bin
|
|
'';
|
|
|
|
|
|
|
|
}
|