From bd553581596358e4d751585ca6795023e30a352d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Thu, 2 May 2013 11:32:23 +0400 Subject: [PATCH] Adding filegive, my file sending program --- pkgs/tools/networking/filegive/default.nix | 30 ++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 pkgs/tools/networking/filegive/default.nix diff --git a/pkgs/tools/networking/filegive/default.nix b/pkgs/tools/networking/filegive/default.nix new file mode 100644 index 00000000000..be1b20e1689 --- /dev/null +++ b/pkgs/tools/networking/filegive/default.nix @@ -0,0 +1,30 @@ +{ stdenv, fetchurl, go }: + +assert stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64 || stdenv.isArm); + +stdenv.mkDerivation rec { + name = "filegive-0.3"; + + src = fetchurl { + url = "http://viric.name/cgi-bin/filegive/tarball/filegive-0.3.tar.gz?uuid=v0.3"; + name = "${name}.tar.gz"; + sha256 = "1xiz47q6f579nb36p973bb3wjszn515v0sjh76pif1cihijdsb5y"; + }; + + buildInputs = [ go ]; + + buildPhase = '' + ${stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "export GOARM=5"} + go build -o filegive + ''; + + installPhase = '' + ensureDir $out/bin + cp filegive $out/bin + ''; + + meta = { + homepage = http://viric.name/cgi-bin/filegive; + license = "BSD"; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 76de4b6090a..f2179173f98 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -767,6 +767,8 @@ let file = callPackage ../tools/misc/file { }; + filegive = callPackage ../tools/networking/filegive { }; + fileschanged = callPackage ../tools/misc/fileschanged { }; findutils = callPackage ../tools/misc/findutils { };