about summary refs log tree commit diff
path: root/pkgs/development/tools
diff options
context:
space:
mode:
author06kellyjac <dev@j-k.io>2021-02-12 15:07:16 +0000
committer06kellyjac <dev@j-k.io>2021-02-12 15:07:16 +0000
commita66a0f8b61b0b257839d6890552af750e6286544 (patch)
treed2bf88f7a2703d84c40a769b86c27e559dbc5e2b /pkgs/development/tools
parent660333ed26ec0c6b0e3e11949806c1080356928f (diff)
downloadnixlib-a66a0f8b61b0b257839d6890552af750e6286544.tar
nixlib-a66a0f8b61b0b257839d6890552af750e6286544.tar.gz
nixlib-a66a0f8b61b0b257839d6890552af750e6286544.tar.bz2
nixlib-a66a0f8b61b0b257839d6890552af750e6286544.tar.lz
nixlib-a66a0f8b61b0b257839d6890552af750e6286544.tar.xz
nixlib-a66a0f8b61b0b257839d6890552af750e6286544.tar.zst
nixlib-a66a0f8b61b0b257839d6890552af750e6286544.zip
dockle: init at 0.3.1
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r--pkgs/development/tools/dockle/default.nix43
1 files changed, 43 insertions, 0 deletions
diff --git a/pkgs/development/tools/dockle/default.nix b/pkgs/development/tools/dockle/default.nix
new file mode 100644
index 000000000000..c20e2866dc7e
--- /dev/null
+++ b/pkgs/development/tools/dockle/default.nix
@@ -0,0 +1,43 @@
+{ lib, buildGoModule, fetchFromGitHub, pkg-config, btrfs-progs, lvm2 }:
+
+buildGoModule rec {
+  pname = "dockle";
+  version = "0.3.1";
+
+  src = fetchFromGitHub {
+    owner = "goodwithtech";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-Zc2ZlyeWdRvyuJLDDTONfh0/q+HKR4lNtSFMjgJWrRY=";
+  };
+
+  vendorSha256 = "sha256-4IJKXcnMXBqoEjsV4Xg2QYvKwxDDUjcZtrj9IRuT6i4=";
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = [ btrfs-progs lvm2 ];
+
+  buildFlagsArray = [
+    "-ldflags="
+    "-s"
+    "-w"
+    "-X main.version=${version}"
+  ];
+
+  preCheck = ''
+    # Remove tests that use networking
+    rm pkg/scanner/scan_test.go pkg/utils/fetch_test.go
+  '';
+
+  meta = with lib; {
+    homepage = "https://containers.goodwith.tech";
+    changelog = "https://github.com/goodwithtech/dockle/releases/tag/v${version}";
+    description = "Container Image Linter for Security";
+    longDescription = ''
+      Container Image Linter for Security.
+      Helping build the Best-Practice Docker Image.
+      Easy to start.
+    '';
+    license = licenses.asl20;
+    maintainers = with maintainers; [ jk ];
+  };
+}