Skip to content

Commit

Permalink
Merge pull request #60 from numtide/build-go-module
Browse files Browse the repository at this point in the history
  • Loading branch information
zimbatm authored Oct 30, 2024
2 parents 2c5e304 + a8070f8 commit 09dec2d
Show file tree
Hide file tree
Showing 1,409 changed files with 24 additions and 441,510 deletions.
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

0 comments on commit 09dec2d

Please sign in to comment.