Skip to content

Commit

Permalink
Merge pull request #105 from twirphp/nix-build
Browse files Browse the repository at this point in the history
build: initial support for nix flake build
  • Loading branch information
sagikazarmark committed Jan 29, 2022
2 parents 8ba8abd + 6d809ef commit 046c88b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/.direnv/
/bin/
/build/
/result

# PHP
.php-cs-fixer.php
Expand Down
23 changes: 22 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,28 @@

subPackages = [ "clientcompat" ];
};
in {
in
rec
{
defaultPackage = packages.protoc-gen-twirp_php;

packages.protoc-gen-twirp_php = pkgs.buildGoModule rec {
pname = "protoc-gen-twirp_php";
version = "0.8.1";

src = ./.;

vendorSha256 = "sha256-z3Yp+Yy03g2DAvWUZXaOxQWONjnYUl69eTpYIDPhsqc=";

subPackages = [ "protoc-gen-twirp_php" ];

ldflags = [
"-w"
"-s"
"-X main.version=v${version}"
];
};

devShell = pkgs.mkShell {
buildInputs = with pkgs;
[
Expand Down

0 comments on commit 046c88b

Please sign in to comment.