mirror of
https://github.com/fosrl/newt.git
synced 2026-02-25 22:36:42 +00:00
Update version to 1.4.1 and update version_replaceme when using nix build
This commit is contained in:
20
flake.nix
20
flake.nix
@@ -22,17 +22,25 @@
|
|||||||
system:
|
system:
|
||||||
let
|
let
|
||||||
pkgs = pkgsFor system;
|
pkgs = pkgsFor system;
|
||||||
|
|
||||||
|
# Update version when releasing
|
||||||
|
version = "1.4.1";
|
||||||
|
|
||||||
|
# Update the version in a new source tree
|
||||||
|
srcWithReplacedVersion = pkgs.runCommand "newt-src-with-version" { } ''
|
||||||
|
cp -r ${./.} $out
|
||||||
|
chmod -R +w $out
|
||||||
|
rm -rf $out/.git $out/result $out/.envrc $out/.direnv
|
||||||
|
find $out -name "*.go" -type f -exec sed -i "s/version_replaceme/${version}/g" {} \;
|
||||||
|
'';
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
default = self.packages.${system}.pangolin-newt;
|
default = self.packages.${system}.pangolin-newt;
|
||||||
pangolin-newt = pkgs.buildGoModule {
|
pangolin-newt = pkgs.buildGoModule {
|
||||||
pname = "pangolin-newt";
|
pname = "pangolin-newt";
|
||||||
version = "1.4.0";
|
version = version;
|
||||||
|
src = srcWithReplacedVersion;
|
||||||
src = ./.;
|
vendorHash = "sha256-PENsCO2yFxLVZNPgx2OP+gWVNfjJAfXkwWS7tzlm490=";
|
||||||
|
|
||||||
vendorHash = "sha256-V8sq7XD/HJFKjhggrDWPdEEq3hjz0IHzpybQXA8Z/pg=";
|
|
||||||
|
|
||||||
meta = with pkgs.lib; {
|
meta = with pkgs.lib; {
|
||||||
description = "A tunneling client for Pangolin";
|
description = "A tunneling client for Pangolin";
|
||||||
homepage = "https://github.com/fosrl/newt";
|
homepage = "https://github.com/fosrl/newt";
|
||||||
|
|||||||
Reference in New Issue
Block a user