commit 49ecf2d4f88b78fdb071bcbc9732265d7a9ffc11
parent 5cf4608a63bb7d8a865f7cc0cc62bf48e0acaa09
Author: William Casarin <jb55@jb55.com>
Date: Fri, 4 Nov 2022 14:46:49 -0700
fix issues
Diffstat:
3 files changed, 38 insertions(+), 0 deletions(-)
diff --git a/.envrc b/.envrc
@@ -0,0 +1 @@
+use nix
diff --git a/.gitignore b/.gitignore
@@ -0,0 +1,2 @@
+/.direnv
+/result
diff --git a/default.nix b/default.nix
@@ -0,0 +1,35 @@
+{ nixpkgs ? import <nixpkgs> {} }:
+let drv =
+{ stdenv
+, perlPackages
+, makeWrapper
+, perl
+, rsync
+, openssh
+, fetchFromGitHub
+}:
+stdenv.mkDerivation rec {
+ name = "sharefile-${version}";
+ version = "1.1.0";
+ buildInputs = [ perl perlPackages.URI perlPackages.URIEscapeXS makeWrapper rsync openssh ];
+
+ src = ./.;
+
+ installPhase = ''
+ mkdir -p $out/bin
+
+ cp sharefile $out/bin
+ cp hashshare $out/bin
+ cp hashname $out/bin
+ cp share_last_ss $out/bin
+
+ for prog in $(echo "$out/bin/"*)
+ do
+ wrapProgram "$prog" \
+ --prefix PERL5LIB : "$PERL5LIB" \
+ --prefix PATH : "$out/bin:{perl}/bin"
+ done
+ '';
+};
+in
+nixpkgs.callPackage drv {}