about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/web/lucky-cli/default.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2020-05-12 14:45:39 +0000
committerAlyssa Ross <hi@alyssa.is>2020-05-12 14:56:01 +0000
commiteb7dadee9c0f903f1152f8dd4165453bfa48ccf4 (patch)
treea6bd66dcbec895aae167465672af08a1ca70f089 /nixpkgs/pkgs/development/web/lucky-cli/default.nix
parent3879b925f5dae3a0eb5c98b10c1ac5a0e4d729a3 (diff)
parent683c68232e91f76386db979c461d8fbe2a018782 (diff)
downloadnixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.gz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.bz2
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.lz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.xz
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.tar.zst
nixlib-eb7dadee9c0f903f1152f8dd4165453bfa48ccf4.zip
Merge commit '683c68232e91f76386db979c461d8fbe2a018782'
Diffstat (limited to 'nixpkgs/pkgs/development/web/lucky-cli/default.nix')
-rw-r--r--nixpkgs/pkgs/development/web/lucky-cli/default.nix42
1 files changed, 42 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/web/lucky-cli/default.nix b/nixpkgs/pkgs/development/web/lucky-cli/default.nix
new file mode 100644
index 000000000000..76f40de4ed13
--- /dev/null
+++ b/nixpkgs/pkgs/development/web/lucky-cli/default.nix
@@ -0,0 +1,42 @@
+{ lib, fetchFromGitHub, crystal, makeWrapper, openssl }:
+
+crystal.buildCrystalPackage rec {
+  pname = "lucky-cli";
+  version = "0.20.0";
+
+  src = fetchFromGitHub {
+    owner = "luckyframework";
+    repo = "lucky_cli";
+    rev = "v${version}";
+    sha256 = "0n7fgnsivf39bkxpf7xgg9dqkam08axdn1j45wl1n0r4qmfkjs94";
+  };
+
+  # the integration tests will try to clone a remote repos
+  postPatch = ''
+    rm -rf spec/integration
+  '';
+
+  format = "crystal";
+
+  lockFile = ./shard.lock;
+  shardsFile = ./shards.nix;
+
+  crystalBinaries.lucky.src = "src/lucky.cr";
+
+  buildInputs = [ openssl ];
+
+  nativeBuildInputs = [ makeWrapper ];
+
+  postInstall = ''
+    wrapProgram $out/bin/lucky \
+      --prefix PATH : ${lib.makeBinPath [ crystal ]}
+  '';
+
+  meta = with lib; {
+    description =
+      "A Crystal library for creating and running tasks. Also generates Lucky projects";
+    license = licenses.mit;
+    maintainers = with maintainers; [ peterhoeg ];
+    platforms = platforms.unix;
+  };
+}