mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-09-11 13:37:36 +03:00
Problem: After a recent switch to GitHub Actions, job that creates prerelease suddenly stopped working. Solution: Switch to the autoreleasing script from serokell.nix which uses 'gh' instead of 'hub'.
38 lines
999 B
Nix
38 lines
999 B
Nix
# SPDX-FileCopyrightText: 2019 Serokell <https://serokell.io>
|
|
#
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
let
|
|
defaultNix = import ../default.nix;
|
|
in
|
|
{ pkgs ? defaultNix.legacyPackages }:
|
|
let
|
|
xrefcheck-x86_64-linux = defaultNix.packages.xrefcheck-static;
|
|
|
|
xrefcheck-x86_64-windows = defaultNix.packages.xrefcheck-windows;
|
|
|
|
mkZip = { name, paths, compression ? 5 }:
|
|
pkgs.stdenvNoCC.mkDerivation {
|
|
inherit name;
|
|
buildInputs = [ pkgs.zip ];
|
|
buildCommand = ''
|
|
mkdir -p "$out"
|
|
zip "$out/$name.zip" -jr ${toString paths} -${toString compression}
|
|
'';
|
|
};
|
|
|
|
xrefcheck-x86_64-windows-zip = mkZip {
|
|
name = "xrefcheck-x86_64-windows";
|
|
paths = [ "${xrefcheck-x86_64-windows}/bin" ];
|
|
};
|
|
|
|
in pkgs.linkFarm "xrefcheck-release" [
|
|
{
|
|
name = "xrefcheck-x86_64-linux";
|
|
path = "${xrefcheck-x86_64-linux}/bin/xrefcheck";
|
|
}
|
|
{
|
|
name = "xrefcheck-x86_64-windows.zip";
|
|
path = "${xrefcheck-x86_64-windows-zip}/xrefcheck-x86_64-windows.zip";
|
|
}
|
|
]
|