Skip to content

Commit

Permalink
chore: package as nix flake
Browse files Browse the repository at this point in the history
  • Loading branch information
David Arnold committed Jul 19, 2020
1 parent 45086b3 commit aae617b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
41 changes: 41 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 30 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{

description = "Kubernetes object analysis with recommendations for improved reliability and security";

inputs.flake-utils.url = "github:numtide/flake-utils";

outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let pkgs = import nixpkgs { inherit system; }; in
rec {
packages.kube-score = pkgs.buildGoModule {
name = "kube-score";
src = self;
vendorSha256 = "sha256-E9pcJsnoF/SKRCjrHZY8Ybd8kV1F3FYwdnLJ0mHyRLA="; # master
# vendorSha256 = "sha256-COY4AonAvJhH+io6Z7I9CsK1pnsK/Yi248QMkVPK6u0="; # v1.7.2
buildFlagsArray = ''
-ldflags=
-w -s
-X main.version=rolling
-X main.commit=${if self ? rev then self.rev else "dirty"}
-X main.date=${self.lastModifiedDate}
-X main.builtBy=nix
'';
};
defaultPackage = packages.kube-score;
apps.kube-score = flake-utils.lib.mkApp { drv = packages.kube-score; };
defaultApp = apps.kube-score;
}
);
}

0 comments on commit aae617b

Please sign in to comment.