From 975195a4743fabddb8410ef7a204501a70fc4bf5 Mon Sep 17 00:00:00 2001 From: Kim Burgess Date: Mon, 21 Oct 2019 18:35:26 +1000 Subject: [PATCH] ameba: init at 0.10.1 --- pkgs/development/tools/ameba/default.nix | 42 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 ++ 2 files changed, 44 insertions(+) create mode 100644 pkgs/development/tools/ameba/default.nix diff --git a/pkgs/development/tools/ameba/default.nix b/pkgs/development/tools/ameba/default.nix new file mode 100644 index 000000000000..1361dedde3c2 --- /dev/null +++ b/pkgs/development/tools/ameba/default.nix @@ -0,0 +1,42 @@ +{ stdenv, lib, fetchFromGitHub, crystal, shards }: + +stdenv.mkDerivation { + pname = "ameba"; + version = "0.10.1"; + + src = fetchFromGitHub { + owner = "crystal-ameba"; + repo = "ameba"; + rev = "v0.10.1"; + sha256 = "0dcw7px7g0c5pxpdlirhirqzhcc7gdwdfiwb9kgm4x1k74ghjgxq"; + }; + + nativeBuildInputs = [ crystal shards ]; + + buildPhase = '' + runHook preBuild + shards build --release + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + install -Dm755 -t $out/bin bin/ameba + runHook postInstall + ''; + + doCheck = true; + + checkPhase = '' + runHook preCheck + crystal spec + runHook postCheck + ''; + + meta = with stdenv.lib; { + description = "A static code analysis tool for Crystal"; + homepage = https://crystal-ameba.github.io; + license = licenses.mit; + maintainers = with maintainers; [ kimburgess ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index e2b2fef97d6d..0db2fd476c46 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -9487,6 +9487,8 @@ in alloy5 alloy; + ameba = callPackage ../development/tools/ameba { }; + augeas = callPackage ../tools/system/augeas { }; inherit (callPackage ../tools/admin/ansible { })