From 98c22f2d03a686b63e1ae3029aaa98c4afe9a2d5 Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 24 Nov 2018 13:28:05 +0000 Subject: [PATCH] semver-tool: init at 2.1.0 Cherry-picked from: https://github.com/alyssais/nixpkgs/commit/eeb175169f65201bd47ece5d0593d3c7c386077d Although fixed so that it actually builds. Original message: > I chose "semver-tool" as the path for this package because "semver" is > extremely generic, and probably more rightly belongs to node-semver[1] > (at least judging by GitHub stars), and because "semver-tool" is the > name of this project's GitHub repository, and because it was the name > used in the package request[2]. > > Closes https://github.com/NixOS/nixpkgs/issues/50945. > > [1]: https://github.com/npm/node-semver > [2]: https://github.com/NixOS/nixpkgs/issues/50945 Signed-off-by: Matthias Beyer --- .../tools/misc/semver-tool/default.nix | 32 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 34 insertions(+) create mode 100644 pkgs/development/tools/misc/semver-tool/default.nix diff --git a/pkgs/development/tools/misc/semver-tool/default.nix b/pkgs/development/tools/misc/semver-tool/default.nix new file mode 100644 index 00000000000..879346a2b79 --- /dev/null +++ b/pkgs/development/tools/misc/semver-tool/default.nix @@ -0,0 +1,32 @@ +{ stdenv, lib, fetchFromGitHub }: + +stdenv.mkDerivation rec { + pname = "semver-tool"; + version = "2.1.0"; + + src = fetchFromGitHub { + owner = "fsaintjacques"; + repo = pname; + rev = version; + sha256 = "0lpwsa86qb5w6vbnsn892nb3qpxxx9ifxch8pw3ahzx2dqhdgnrr"; + }; + + dontBuild = true; # otherwise we try to 'make' which fails. + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin + install src/semver $out/bin + + runHook postInstall + ''; + + meta = with lib; { + homepage = https://github.com/fsaintjacques/semver-tool; + description = "semver bash implementation"; + license = licenses.gpl3Plus; + platforms = platforms.unix; + maintainers = [ maintainers.qyliss ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e1dd7f5208b..124065bc1bb 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9264,6 +9264,8 @@ in selendroid = callPackage ../development/tools/selenium/selendroid { }; + semver-tool = callPackage ../development/tools/misc/semver-tool { }; + sconsPackages = dontRecurseIntoAttrs (callPackage ../development/tools/build-managers/scons { }); scons = sconsPackages.scons_latest;