Skip to content

Commit

Permalink
really use go1.22 for nix build
Browse files Browse the repository at this point in the history
Signed-off-by: Chmouel Boudjnah <[email protected]>
  • Loading branch information
chmouel committed Sep 26, 2024
1 parent 328d497 commit f8c1b1e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 28 deletions.
5 changes: 3 additions & 2 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildGoModule rec {
name = "gosmee-${version}";

src = packageSrc;
vendorSha256 = null;
vendorHash = null;

postUnpack = ''
printf ${version} > $sourceRoot/gosmee/templates/version
Expand All @@ -19,7 +19,8 @@ buildGoModule rec {
'';

meta = {
description = "Command line server and client for webhooks deliveries (and https://smee.io)";
description =
"Command line server and client for webhooks deliveries (and https://smee.io)";
homepage = "https://github.com/chmouel/gosmee";
license = lib.licenses.asl20;
};
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

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

41 changes: 21 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
description = "gosmee — command line server and client for webhooks deliveries (and https://smee.io)";
description =
"gosmee — command line server and client for webhooks deliveries (and https://smee.io)";

inputs.utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
Expand All @@ -8,41 +9,41 @@
let
# Generate a user-friendly version number.
version = self.rev or (builtins.substring 0 8 self.lastModifiedDate);
in
utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
in utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" ] (system:
let
pkgs = nixpkgs.legacyPackages.${system};
gosmee = pkgs.callPackage ./default.nix {
packageSrc = self;
buildGoModule = pkgs.buildGo121Module;
buildGoModule = pkgs.buildGo122Module;
version = version;
};
in
{
in {
packages = {
gosmee = gosmee;
default = self.packages.${system}.gosmee;
};
apps = {
gosmee = utils.lib.mkApp { drv = self.packages.${system}.gosmee; name = "gosmee"; };
gosmee = utils.lib.mkApp {
drv = self.packages.${system}.gosmee;
name = "gosmee";
};
default = self.apps.${system}.gosmee;
};
# FIXME: fix the overlay and nix flake check
# overlays = {
# default = final: prev: { gosmee = gosmee; };
# };
devShell = pkgs.mkShell
{
nativeBuildInputs = [
pkgs.go_1_22
pkgs.gnumake
pkgs.pre-commit # needed for pre-commit install
pkgs.git # needed for pre-commit install
pkgs.yamllint # needed for pre-commit install
];
shellHook = ''
pre-commit install
'';
};
devShell = pkgs.mkShell {
nativeBuildInputs = [
pkgs.go_1_22
pkgs.gnumake
pkgs.pre-commit # needed for pre-commit install
pkgs.git # needed for pre-commit install
pkgs.yamllint # needed for pre-commit install
];
shellHook = ''
pre-commit install
'';
};
});
}

0 comments on commit f8c1b1e

Please sign in to comment.