Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to buildGoModule #60

Merged
merged 7 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
31 changes: 15 additions & 16 deletions default.nix
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
{ system ? builtins.currentSystem
, inputs ? import ./flake.lock.nix { }
, nixpkgs ? import inputs.nixpkgs {
{
system ? builtins.currentSystem,
inputs ? import ./flake.lock.nix { },
nixpkgs ? import inputs.nixpkgs {
inherit system;
# Makes the config pure as well. See <nixpkgs>/top-level/impure.nix:
config = { };
overlays = [ ];
}
, buildGoPackage ? nixpkgs.buildGoPackage
},
buildGoModule ? nixpkgs.buildGoModule,
}:
let
versionFile = builtins.readFile ./version.go;
versionMatch = builtins.match ".*\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*" versionFile;
version = builtins.head versionMatch;
github-deploy = buildGoPackage
rec {
name = "github-deploy-${version}";
goPackagePath = "github.com/zimbatm/github-deploy";
src = nixpkgs.lib.cleanSource ./.;
# FIXME: for some reason the go reference rewrites are failing
allowGoReference = true;
};
inherit (nixpkgs) lib;
versionFile = lib.readFile ./version.go;
versionMatch = lib.match ".*\"([0-9]+\\.[0-9]+\\.[0-9]+)\".*" versionFile;
version = lib.head versionMatch;
github-deploy = buildGoModule {
name = "github-deploy-${version}";
src = nixpkgs.lib.cleanSource ./.;
vendorHash = "sha256-vcm3UhqwiUCdope9TpfO/CQQsxM0eh8nhvOCv4bGCng=";
};
in
{
inherit github-deploy;
Expand Down
25 changes: 4 additions & 21 deletions flake.lock

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

14 changes: 5 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
{
inputs = {
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
nixpkgs.url = "github:nixos/nixpkgs/release-23.05";
nixpkgs.url = "github:nixos/nixpkgs/release-24.05";
flake-utils.url = "github:numtide/flake-utils";
};

outputs = { self, nixpkgs, flake-utils, flake-compat }:
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachSystem [ "x86_64-linux" ] (system:
let
pkgs = import nixpkgs { inherit system; };
github-deploy = import self {
inherit system;
inputs = null;
nixpkgs = nixpkgs.legacyPackages.${system};
};
name = "github-deploy";
in
with pkgs;
{
devShell = github-deploy.devShell;
packages.${name} = github-deploy.github-deploy;
packages.default = self.packages.${system}.github-deploy;
defaultPackage = github-deploy.defaultPackage;

checks.${name} = github-deploy.github-deploy;
}
);
}

14 changes: 0 additions & 14 deletions github-deploy.nix

This file was deleted.

12 changes: 0 additions & 12 deletions vendor/dario.cat/mergo/.deepsource.toml

This file was deleted.

33 changes: 0 additions & 33 deletions vendor/dario.cat/mergo/.gitignore

This file was deleted.

12 changes: 0 additions & 12 deletions vendor/dario.cat/mergo/.travis.yml

This file was deleted.

46 changes: 0 additions & 46 deletions vendor/dario.cat/mergo/CODE_OF_CONDUCT.md

This file was deleted.

112 changes: 0 additions & 112 deletions vendor/dario.cat/mergo/CONTRIBUTING.md

This file was deleted.

28 changes: 0 additions & 28 deletions vendor/dario.cat/mergo/LICENSE

This file was deleted.

Loading
Loading