aboutsummaryrefslogtreecommitdiff
path: root/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
parent8a5bbc3b0b1c6ab252d0c98950456a9d4cc2e9fe (diff)
downloadgarage-2a3afcaf659bca7fa43501f6adb016626e6f29ed.tar.gz
garage-2a3afcaf659bca7fa43501f6adb016626e6f29ed.zip
Test WinSCPtest/winscp
Diffstat (limited to 'nix')
-rw-r--r--nix/toolchain.nix2
-rw-r--r--nix/winscp.nix28
2 files changed, 30 insertions, 0 deletions
diff --git a/nix/toolchain.nix b/nix/toolchain.nix
index e8baa63a..7f5d89d3 100644
--- a/nix/toolchain.nix
+++ b/nix/toolchain.nix
@@ -18,6 +18,7 @@ let
pkgsHost = import pkgsSrc {};
lib = pkgsHost.lib;
kaniko = (import ./kaniko.nix) pkgsHost;
+ winscp = (import ./winscp.nix) pkgsHost;
in
lib.flatten (builtins.map (pkgs: [
pkgs.rustPlatform.rust.rustc
@@ -25,5 +26,6 @@ in
pkgs.buildPackages.stdenv.cc
]) pkgsList) ++ [
kaniko
+ winscp
]
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
+ '';
+}