nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

commit 1789cddb86b0e2bd0982765ae02c5b6feff5e614
parent d4e7ec3d71893b4321d33e92b0b1351c24663be3
Author: Nikolay Korotkiy <sikmir@gmail.com>
Date:   Sat, 28 Dec 2019 18:30:00 +0300

Add supload

Diffstat:
Mdefault.nix | 3+++
Mnix/sources.json | 12++++++++++++
Apkgs/supload/default.nix | 31+++++++++++++++++++++++++++++++
3 files changed, 46 insertions(+), 0 deletions(-)

diff --git a/default.nix b/default.nix @@ -79,6 +79,9 @@ in rec { else callPackage ./pkgs/stardict-tools { inherit (sources) stardict-3; }; + supload = callPackage ./pkgs/supload { + inherit (sources) supload; + }; ueberzug = python3Packages.callPackage ./pkgs/ueberzug { inherit (sources) ueberzug; }; diff --git a/nix/sources.json b/nix/sources.json @@ -215,6 +215,18 @@ "url": "https://github.com/huzheng001/stardict-3/archive/8c5c26996dca52d6bda0aedb5da0381db930a733.tar.gz", "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" }, + "supload": { + "branch": "master", + "description": "Bash script for upload file to cloud storage based on OpenStack Swift API.", + "homepage": "", + "owner": "selectel", + "repo": "supload", + "rev": "70690682867713c68d7c6daa833a1013e79df407", + "sha256": "0di1hr9j2wdicj6n2mlf9achfxd05rqwrfnymsnxhhy7sv50n2bm", + "type": "tarball", + "url": "https://github.com/selectel/supload/archive/70690682867713c68d7c6daa833a1013e79df407.tar.gz", + "url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz" + }, "ueberzug": { "branch": "master", "description": "ueberzug is an alternative for w3mimgdisplay", diff --git a/pkgs/supload/default.nix b/pkgs/supload/default.nix @@ -0,0 +1,31 @@ +{ stdenv, curl, file, coreutils, supload }: + +stdenv.mkDerivation rec { + pname = "supload"; + version = stdenv.lib.substring 0 7 src.rev; + src = supload; + + buildInputs = [ curl file ]; + + dontBuild = true; + dontConfigure = true; + + prePatch = '' + substituteInPlace supload.sh \ + --replace '`which curl`' '${curl}/bin/curl' \ + --replace '`which file`' '${file}/bin/file' \ + --replace '`which md5sum`' '${coreutils}/bin/md5sum' + ''; + + installPhase = '' + install -Dm755 supload.sh $out/bin/supload + ''; + + meta = with stdenv.lib; { + description = supload.description; + homepage = "https://github.com/selectel/supload"; + license = licenses.gpl3; + maintainers = with maintainers; [ sikmir ]; + platforms = platforms.unix; + }; +}