Skip to content
Snippets Groups Projects
Verified Commit df658fb8 authored by Volker Schukai's avatar Volker Schukai :alien:
Browse files

chore: introduce flake

parent 147325d5
No related branches found
No related tags found
No related merge requests found
flake-profile-3-link
\ No newline at end of file
/nix/store/aq8afyapzza1jwfcqg93a0v9rc8daafa-hello-2.12.1-env
\ No newline at end of file
/nix/store/4mmf088cwn4m6ysv0wvrqfyc9ickk73n-bob-env
\ No newline at end of file
/nix/store/rjlpb1dfqkx4ij5700s761mmfbs1pvkp-bob-env
\ No newline at end of file
.envrc 0 → 100644
use flake
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1688500189,
"narHash": "sha256-djYYiY4lzJOlXOnTHytH6BUugrxHDZjuGxTSrU4gt4M=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "78419edadf0fabbe5618643bd850b2f2198ed060",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}
{
description = "Bob: The HTML and HTML fragment builder";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
systems = [ "x86_64-linux" "aarch64-linux" ];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
makePackage = system:
let
pkgs = import nixpkgs { inherit system; overlays = [ self.overlay ]; };
in
pkgs.bob;
in
{
overlay = final: prev: {
bob = final.buildGoModule {
name = "bob";
src = ././application/source;
vendorSha256 = null; # Use "nix to-sri --type sha256" on the actual hash
doCheck = false;
buildFlagsArray = [
"-ldflags=-X main.Version=${self.lastModifiedDate}"
];
};
};
defaultPackage = forAllSystems makePackage;
checks = {
test = forAllSystems makePackage;
};
};
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment