Merge pull request #209287 from thenonameguy/process-compose

process-compose: 0.29.1 -> 0.29.7
This commit is contained in:
figsoda 2023-01-10 11:23:08 -05:00 committed by GitHub
commit c7341c646c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,21 +4,39 @@
, installShellFiles
}:
let config-module = "github.com/f1bonacc1/process-compose/src/config";
in
buildGoModule rec {
pname = "process-compose";
version = "0.29.1";
version = "0.29.7";
src = fetchFromGitHub {
owner = "F1bonacc1";
repo = pname;
rev = "v${version}";
hash = "sha256-FB0PjvPBfbytIXwYs+eT9PMnKX/yymrajlJ42FDlMFs=";
hash = "sha256-gVXil6Gc65/6VMuONfVyxU6SSV0vCbJKXDvtG4a+pbU=";
# populate values that require us to use git. By doing this in postFetch we
# can delete .git afterwards and maintain better reproducibility of the src.
leaveDotGit = true;
postFetch = ''
cd "$out"
git rev-parse --short HEAD > $out/COMMIT
# in format of 0000-00-00T00:00:00Z
date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%dT%H:%M:%SZ" > $out/SOURCE_DATE_EPOCH
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
# ldflags based on metadata from git and source
preBuild = ''
ldflags+=" -X ${config-module}.Commit=$(cat COMMIT)"
ldflags+=" -X ${config-module}.Date=$(cat SOURCE_DATE_EPOCH)"
'';
ldflags = [
"-X ${config-module}.Version=v${version}"
"-s"
"-w"
"-X main.version=v${version}"
];
nativeBuildInputs = [