aboutsummaryrefslogtreecommitdiff
path: root/nix/winscp.nix
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-03-03 13:34:20 +0100
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-03-03 14:29:10 +0100
commit2a3afcaf659bca7fa43501f6adb016626e6f29ed (patch)
tree8449770f71839a446c8f8fb617833daf5b5e0164 /nix/winscp.nix
parent8a5bbc3b0b1c6ab252d0c98950456a9d4cc2e9fe (diff)
downloadgarage-2a3afcaf659bca7fa43501f6adb016626e6f29ed.tar.gz
garage-2a3afcaf659bca7fa43501f6adb016626e6f29ed.zip
Test WinSCPtest/winscp
Diffstat (limited to 'nix/winscp.nix')
-rw-r--r--nix/winscp.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nix/winscp.nix b/nix/winscp.nix
new file mode 100644
index 00000000..10d3cb28
--- /dev/null
+++ b/nix/winscp.nix
@@ -0,0 +1,28 @@
+pkgs:
+
+pkgs.stdenv.mkDerivation rec {
+ pname = "winscp";
+ version = "5.19.6";
+
+ src = pkgs.fetchzip {
+ url = "https://winscp.net/download/WinSCP-${version}-Portable.zip";
+ sha256 = "sha256-8+6JuT0b1fFQ6etaFTMSjIKvDGzmJoHAuByXiqCBzu0=";
+ stripRoot = false;
+ };
+
+ buildPhase = ''
+ cat > winscp <<EOF
+#!${pkgs.bash}/bin/bash
+
+WINEDEBUG=-all
+${pkgs.winePackages.minimal}/bin/wine $out/opt/WinSCP.com
+EOF
+ '';
+
+ installPhase = ''
+ mkdir -p $out/{bin,opt}
+ cp {WinSCP.com,WinSCP.exe} $out/opt
+ cp winscp $out/bin
+ chmod +x $out/bin/winscp
+ '';
+}