about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorArseniy Seroka <jagajaga@users.noreply.github.com>2015-09-08 13:29:01 +0300
committerArseniy Seroka <jagajaga@users.noreply.github.com>2015-09-08 13:29:01 +0300
commit91339593be8aa0175f69802202a79e6ddbd58596 (patch)
tree5d56936f692c8b74954bd896761f5c0631b31d71 /pkgs
parent0236bd659013739f5047c714923f4735d5bfc200 (diff)
parent280c896a94a95142d2e8aede29e8b8b68b9c945a (diff)
downloadnixlib-91339593be8aa0175f69802202a79e6ddbd58596.tar
nixlib-91339593be8aa0175f69802202a79e6ddbd58596.tar.gz
nixlib-91339593be8aa0175f69802202a79e6ddbd58596.tar.bz2
nixlib-91339593be8aa0175f69802202a79e6ddbd58596.tar.lz
nixlib-91339593be8aa0175f69802202a79e6ddbd58596.tar.xz
nixlib-91339593be8aa0175f69802202a79e6ddbd58596.tar.zst
nixlib-91339593be8aa0175f69802202a79e6ddbd58596.zip
Merge pull request #9702 from ardumont/add-github-release
[new] github-release
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/tools/github/github-release/default.nix51
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 53 insertions, 0 deletions
diff --git a/pkgs/development/tools/github/github-release/default.nix b/pkgs/development/tools/github/github-release/default.nix
new file mode 100644
index 000000000000..f7e95503d063
--- /dev/null
+++ b/pkgs/development/tools/github/github-release/default.nix
@@ -0,0 +1,51 @@
+{ stdenv, fetchurl }:
+
+let
+  linuxPredicate = stdenv.system == "x86_64-linux";
+  bsdPredicate = stdenv.system == "x86_64-freebsd";
+  darwinPredicate = stdenv.system == "x86_64-darwin";
+  metadata = assert linuxPredicate || bsdPredicate || darwinPredicate;
+    if linuxPredicate then
+      { arch = "linux-amd64";
+        sha256 = "0b3h0d0qsrjx99kcd2cf71xijh44wm5rpm2sr54snh3f7macj2p1";
+        archiveBinaryPath = "linux/amd64"; }
+    else if bsdPredicate then
+      { arch = "freebsd-amd64";
+        sha256 = "1yydm4ndkh80phiwk41kcf6pizvwrfhsfk3jwrrgr42wsnkkgj0q";
+        archiveBinaryPath = "freebsd/amd64"; }
+    else
+      { arch = "darwin-amd64";
+        sha256 = "1dj74cf1ahihia2dr9ii9ky0cpmywn42z2iq1vkbrrcggjvyrnlf";
+        archiveBinaryPath = "darwin/amd64"; };
+in stdenv.mkDerivation rec {
+  shortname = "github-release";
+  name = "${shortname}-${version}";
+  version = "0.6.2";
+
+  src = fetchurl {
+    url = "https://github.com/aktau/github-release/releases/download/v${version}/${metadata.arch}-${shortname}.tar.bz2";
+    sha256 = metadata.sha256;
+  };
+
+  buildInputs = [ ];
+
+  phases = [ "unpackPhase" "installPhase" ];
+
+  installPhase = ''
+    mkdir -p "$out/bin"
+    cp "${metadata.archiveBinaryPath}/github-release" "$out/bin/"
+  '';
+
+  meta = with stdenv.lib; {
+    description = "Commandline app to create and edit releases on Github (and upload artifacts)";
+    longDescription = ''
+      A small commandline app written in Go that allows you to easily create and
+      delete releases of your projects on Github.
+      In addition it allows you to attach files to those releases.
+    '';
+
+    license = licenses.mit;
+    homepage = https://github.com/aktau/github-release;
+    maintainers = with maintainers; [ ardumont ];
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index cfde6da32d25..1065d56e2d62 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -13077,6 +13077,8 @@ let
 
   tribler = callPackage ../applications/networking/p2p/tribler { };
 
+  github-release = callPackage ../development/tools/github/github-release { };
+
   tuxguitar = callPackage ../applications/editors/music/tuxguitar { };
 
   twister = callPackage ../applications/networking/p2p/twister { };