From de310db1edb392f9d96cd365954ef20d87c34e60 Mon Sep 17 00:00:00 2001 From: Volker Schukai <volker.schukai@schukai.com> Date: Wed, 5 Jul 2023 16:27:00 +0200 Subject: [PATCH] chore: add flake support --- .direnv/flake-profile | 2 +- .direnv/flake-profile-10-link | 1 + .direnv/flake-profile-11-link | 1 + .direnv/flake-profile-9-link | 1 + flake.nix | 24 +++++++++++++----------- result | 2 +- 6 files changed, 18 insertions(+), 13 deletions(-) create mode 120000 .direnv/flake-profile-10-link create mode 120000 .direnv/flake-profile-11-link create mode 120000 .direnv/flake-profile-9-link diff --git a/.direnv/flake-profile b/.direnv/flake-profile index 81fbd58..c7ae88b 120000 --- a/.direnv/flake-profile +++ b/.direnv/flake-profile @@ -1 +1 @@ -flake-profile-8-link \ No newline at end of file +flake-profile-11-link \ No newline at end of file diff --git a/.direnv/flake-profile-10-link b/.direnv/flake-profile-10-link new file mode 120000 index 0000000..8bed319 --- /dev/null +++ b/.direnv/flake-profile-10-link @@ -0,0 +1 @@ +/nix/store/ypa023g5zjkd7k3dqzfj9lgz0b8v3k1m-bob-env \ No newline at end of file diff --git a/.direnv/flake-profile-11-link b/.direnv/flake-profile-11-link new file mode 120000 index 0000000..7bc0677 --- /dev/null +++ b/.direnv/flake-profile-11-link @@ -0,0 +1 @@ +/nix/store/4ks8fnmw8wiagdl1q988ydshybd930gp-bob-env \ No newline at end of file diff --git a/.direnv/flake-profile-9-link b/.direnv/flake-profile-9-link new file mode 120000 index 0000000..d2e96d4 --- /dev/null +++ b/.direnv/flake-profile-9-link @@ -0,0 +1 @@ +/nix/store/fmzyd8bwyl43fdmcg80xslg7b46f47pj-bob-env \ No newline at end of file diff --git a/flake.nix b/flake.nix index 28156d0..d9de8ed 100644 --- a/flake.nix +++ b/flake.nix @@ -19,23 +19,25 @@ in { overlay = final: prev: { - bob = final.buildGoModule { + bob = final.buildGoModule rec { name = "bob"; src = ././application/source; vendorSha256 = "sha256-qiObIbA75kfkGzZoTtZbkm4zQqXokL+hiWrJdmL8oxU="; # Use "nix to-sri --type sha256" on the actual hash - doCheck = false; + doCheck = true; nativeBuildInputs = [ final.jq ]; + + + + #buildInputs = [ nixpkgs.go ]; -# preBuild = '' -# jq -r '.version' ${rootPath}/release.json > $TMPDIR/version + ldflags=''-X main.version=${currentVersion} -X main.build=${self.lastModifiedDate}''; + #buildFlags = "-ldflags=-X main.version=${currentVersion} -X main.build=${self.lastModifiedDate}"; +# buildPhase = '' +# buildFlagsArray=( +# "-ldflags=-X main.version=${currentVersion} -X main.build=${self.lastModifiedDate}" +# ) +# buildPhase # ''; - - buildPhase = '' - buildFlagsArray=( - "-ldflags=-X main.version=${currentVersion} -X main.build=${self.lastModifiedDate}" - ) - buildPhase - ''; }; }; diff --git a/result b/result index 607519d..46b390b 120000 --- a/result +++ b/result @@ -1 +1 @@ -/nix/store/nzn16jnc6wgd2p9bwrczn8wl4vysg7y8-bob \ No newline at end of file +/nix/store/c3i50psx5zic5sxnqy46dap3pzfl8fg2-bob \ No newline at end of file -- GitLab