summary refs log tree commit diff
path: root/pkgs/development/tools/build-managers/shards/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/tools/build-managers/shards/default.nix')
-rw-r--r--pkgs/development/tools/build-managers/shards/default.nix26
1 files changed, 15 insertions, 11 deletions
diff --git a/pkgs/development/tools/build-managers/shards/default.nix b/pkgs/development/tools/build-managers/shards/default.nix
index 9fb7c0e64b80..02d5adb0c34d 100644
--- a/pkgs/development/tools/build-managers/shards/default.nix
+++ b/pkgs/development/tools/build-managers/shards/default.nix
@@ -1,28 +1,32 @@
-{ stdenv, fetchurl, crystal, libyaml, which }:
+{ stdenv, fetchFromGitHub, crystal, pcre, libyaml, which }:
 
 stdenv.mkDerivation rec {
   name = "shards-${version}";
   version = "0.8.1";
 
-  src = fetchurl {
-    url = "https://github.com/crystal-lang/shards/archive/v${version}.tar.gz";
-    sha256 = "198768izbsqqp063847r2x9ddcf4qfxx7vx7c6gwbmgjmjv4mivm";
+  src = fetchFromGitHub {
+    owner  = "crystal-lang";
+    repo   = "shards";
+    rev    = "v${version}";
+    sha256 = "1cjn2lafr08yiqzlhyqx14jjjxf1y24i2kk046px07gljpnlgqwk";
   };
 
-  buildInputs = [ crystal libyaml which ];
+  buildInputs = [ crystal libyaml pcre which ];
 
   buildFlags = [ "CRFLAGS=--release" ];
 
   installPhase = ''
-    mkdir -p $out/bin
-    cp bin/shards $out/bin/
+    runHook preInstall
+
+    install -Dm755 bin/shards $out/bin/shards
+
+    runHook postInstall
   '';
 
   meta = with stdenv.lib; {
-    homepage = https://crystal-lang.org/;
-    license = licenses.asl20;
     description = "Dependency manager for the Crystal language";
-    maintainers = with maintainers; [ sifmelcara ];
-    platforms = [ "x86_64-linux" "i686-linux" "x86_64-darwin" ];
+    license     = licenses.asl20;
+    maintainers = with maintainers; [ peterhoeg ];
+    inherit (crystal.meta) homepage platforms;
   };
 }