Merge fort-nix/nix-bitcoin#788: Update to NixOS 25.05
fb56684999ci: enable parallel building (Erik Arvstedt)a52bf46031treewide: streamline bash error reporting (Erik Arvstedt)538b2dcfaeclnrest: update `cargoHash` (Erik Arvstedt)9b607daa78python-packages/specific-versions: remove `coincurve_20` (Erik Arvstedt)9da4d1e8c0python-packages: update to NixOS 25.05 (Erik Arvstedt)79900f941dupdate to nodejs 22 (Erik Arvstedt)9808a5e5d4update to NixOS 25.05 (Erik Arvstedt) Pull request description: ACKs for top commit: jonasnick: ACKfb56684999Tree-SHA512: d2a1493d372860827acbb8ada806aeb9766198034a98f3dc9dccf7afd349381b34de3df30a292ea6a01b435b4a3c66f76477a59ce95d051c14879b463830dcfa
This commit is contained in:
commit
067dad73b3
19 changed files with 42 additions and 228 deletions
|
|
@ -9,7 +9,7 @@ task:
|
||||||
|
|
||||||
container:
|
container:
|
||||||
# Defined in https://github.com/nix-community/docker-nixpkgs
|
# Defined in https://github.com/nix-community/docker-nixpkgs
|
||||||
image: nixpkgs/nix-flakes:nixos-24.11
|
image: nixpkgs/nix-flakes:nixos-25.05
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- name: modules_test
|
- name: modules_test
|
||||||
|
|
@ -29,7 +29,7 @@ task:
|
||||||
- scenario: netnsRegtest
|
- scenario: netnsRegtest
|
||||||
# This script is run as root
|
# This script is run as root
|
||||||
build_script:
|
build_script:
|
||||||
- echo "sandbox = true" >> /etc/nix/nix.conf
|
- printf '%s\n' 'sandbox = true' 'max-jobs = auto' >> /etc/nix/nix.conf
|
||||||
- nix shell --inputs-from . nixpkgs#{bash,coreutils,cachix} -c ./test/ci/build.sh $scenario
|
- nix shell --inputs-from . nixpkgs#{bash,coreutils,cachix} -c ./test/ci/build.sh $scenario
|
||||||
|
|
||||||
- name: flake
|
- name: flake
|
||||||
|
|
|
||||||
|
|
@ -97,5 +97,5 @@ It's easiest to use an existing service as a template:
|
||||||
Most other services use packages that are already included in nixpkgs.
|
Most other services use packages that are already included in nixpkgs.
|
||||||
|
|
||||||
## Switching to a new NixOS release
|
## Switching to a new NixOS release
|
||||||
- Run command `update-flake.sh 24.11`
|
- Run command `update-flake.sh 25.05`
|
||||||
- Treewide: check if any `TODO-EXTERNAL` comments can be resolved
|
- Treewide: check if any `TODO-EXTERNAL` comments can be resolved
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ runuser -u "$(logname)" -- xdg-open "http://$ip:3000"
|
||||||
rtl_src=~/s/RTL
|
rtl_src=~/s/RTL
|
||||||
git clone https://github.com/Ride-The-Lightning/RTL "$rtl_src"
|
git clone https://github.com/Ride-The-Lightning/RTL "$rtl_src"
|
||||||
|
|
||||||
nix build -o /tmp/nix-bitcoin-dev/nodejs --inputs-from . nixpkgs#nodejs-18_x
|
nix build -o /tmp/nix-bitcoin-dev/nodejs --inputs-from . nixpkgs#nodejs_22
|
||||||
# Start a shell in a sandbox
|
# Start a shell in a sandbox
|
||||||
env --chdir "$rtl_src" nix-bitcoin-firejail --whitelist="$rtl_src" --whitelist=/tmp/nix-bitcoin-dev/nodejs
|
env --chdir "$rtl_src" nix-bitcoin-firejail --whitelist="$rtl_src" --whitelist=/tmp/nix-bitcoin-dev/nodejs
|
||||||
PATH=/tmp/nix-bitcoin-dev/nodejs/bin:"$PATH"
|
PATH=/tmp/nix-bitcoin-dev/nodejs/bin:"$PATH"
|
||||||
|
|
|
||||||
|
|
@ -318,7 +318,7 @@
|
||||||
# this value at the release version of the first install of this system.
|
# this value at the release version of the first install of this system.
|
||||||
# Before changing this value read the documentation for this option
|
# Before changing this value read the documentation for this option
|
||||||
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
|
||||||
system.stateVersion = "24.11"; # Did you read the comment?
|
system.stateVersion = "25.05"; # Did you read the comment?
|
||||||
|
|
||||||
# The nix-bitcoin release version that your config is compatible with.
|
# The nix-bitcoin release version that your config is compatible with.
|
||||||
# When upgrading to a backwards-incompatible release, nix-bitcoin will display an
|
# When upgrading to a backwards-incompatible release, nix-bitcoin will display an
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
|
nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
|
||||||
# You can also use a version branch to track a specific NixOS release
|
# You can also use a version branch to track a specific NixOS release
|
||||||
# nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-24.11";
|
# nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-25.05";
|
||||||
|
|
||||||
nixpkgs.follows = "nix-bitcoin/nixpkgs";
|
nixpkgs.follows = "nix-bitcoin/nixpkgs";
|
||||||
nixpkgs-unstable.follows = "nix-bitcoin/nixpkgs-unstable";
|
nixpkgs-unstable.follows = "nix-bitcoin/nixpkgs-unstable";
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
|
inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/release";
|
||||||
# You can also use a version branch to track a specific NixOS release
|
# You can also use a version branch to track a specific NixOS release
|
||||||
# inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-24.11";
|
# inputs.nix-bitcoin.url = "github:fort-nix/nix-bitcoin/nixos-25.05";
|
||||||
|
|
||||||
inputs.nixpkgs.follows = "nix-bitcoin/nixpkgs";
|
inputs.nixpkgs.follows = "nix-bitcoin/nixpkgs";
|
||||||
inputs.nixpkgs-unstable.follows = "nix-bitcoin/nixpkgs-unstable";
|
inputs.nixpkgs-unstable.follows = "nix-bitcoin/nixpkgs-unstable";
|
||||||
|
|
|
||||||
8
flake.lock
generated
8
flake.lock
generated
|
|
@ -44,16 +44,16 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1748037224,
|
"lastModified": 1749237914,
|
||||||
"narHash": "sha256-92vihpZr6dwEMV6g98M5kHZIttrWahb9iRPBm1atcPk=",
|
"narHash": "sha256-N5waoqWt8aMr/MykZjSErOokYH6rOsMMXu3UOVH5kiw=",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "f09dede81861f3a83f7f06641ead34f02f37597f",
|
"rev": "70c74b02eac46f4e4aa071e45a6189ce0f6d9265",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"ref": "nixos-24.11",
|
"ref": "nixos-25.05",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
'';
|
'';
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
|
||||||
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
nixpkgs-unstable.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
flake-utils.url = "github:numtide/flake-utils";
|
||||||
extra-container = {
|
extra-container = {
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ set -euo pipefail
|
||||||
|
|
||||||
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
|
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
|
||||||
|
|
||||||
trap 'echo "Error at ${BASH_SOURCE[0]}, line $LINENO"' ERR
|
trap 'echo "Error at ${BASH_SOURCE[0]}:$LINENO"' ERR
|
||||||
|
|
||||||
repo=fort-nix/nix-bitcoin
|
repo=fort-nix/nix-bitcoin
|
||||||
if [[ ! -v version ]]; then
|
if [[ ! -v version ]]; then
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenvNoCC
|
, stdenvNoCC
|
||||||
, nodejs-18_x
|
, nodejs_22
|
||||||
, nodejs-slim-18_x
|
, nodejs-slim_22
|
||||||
, fetchNodeModules
|
, fetchNodeModules
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
|
@ -17,8 +17,8 @@ let self = stdenvNoCC.mkDerivation {
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
nodejs = nodejs-18_x;
|
nodejs = nodejs_22;
|
||||||
nodejsRuntime = nodejs-slim-18_x;
|
nodejsRuntime = nodejs-slim_22;
|
||||||
|
|
||||||
nodeModules = fetchNodeModules {
|
nodeModules = fetchNodeModules {
|
||||||
inherit (self) src nodejs;
|
inherit (self) src nodejs;
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
inherit (clightning) src;
|
inherit (clightning) src;
|
||||||
|
|
||||||
cargoHash = "sha256-rXOpRNzIDohfvn3n1xEhc/C1pCpzgfFXHjob7/qOeXM=";
|
cargoHash = "sha256-nR4jSpjnB0k/v+E78Jy5AhOLwqJgvAfDKFca3DqaSwQ=";
|
||||||
|
|
||||||
depsExtraArgs = {
|
depsExtraArgs = {
|
||||||
nativeBuildInputs = [ unzip ];
|
nativeBuildInputs = [ unzip ];
|
||||||
|
|
|
||||||
|
|
@ -2,13 +2,6 @@
|
||||||
pkgs: pkgsUnstable:
|
pkgs: pkgsUnstable:
|
||||||
{
|
{
|
||||||
inherit (pkgs)
|
inherit (pkgs)
|
||||||
extra-container
|
|
||||||
hwi
|
|
||||||
lightning-loop
|
|
||||||
lightning-pool
|
|
||||||
lndconnect;
|
|
||||||
|
|
||||||
inherit (pkgsUnstable)
|
|
||||||
bitcoin
|
bitcoin
|
||||||
bitcoind
|
bitcoind
|
||||||
bitcoind-knots
|
bitcoind-knots
|
||||||
|
|
@ -18,8 +11,16 @@ pkgs: pkgsUnstable:
|
||||||
clightning
|
clightning
|
||||||
electrs
|
electrs
|
||||||
elementsd
|
elementsd
|
||||||
|
extra-container
|
||||||
fulcrum
|
fulcrum
|
||||||
lnd;
|
hwi
|
||||||
|
lightning-loop
|
||||||
|
lightning-pool
|
||||||
|
lnd
|
||||||
|
lndconnect;
|
||||||
|
|
||||||
|
inherit (pkgsUnstable)
|
||||||
|
;
|
||||||
|
|
||||||
inherit pkgs pkgsUnstable;
|
inherit pkgs pkgsUnstable;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,10 +26,6 @@ rec {
|
||||||
|
|
||||||
# autobahn 20.12.3, required by joinmarketclient
|
# autobahn 20.12.3, required by joinmarketclient
|
||||||
autobahn = callPackage ./specific-versions/autobahn.nix {};
|
autobahn = callPackage ./specific-versions/autobahn.nix {};
|
||||||
# coincurve 20, required by pyln-proto.
|
|
||||||
coincurve = callPackage ./specific-versions/coincurve_20 {};
|
|
||||||
# scikit-build-core 0_10, required by coincurve.
|
|
||||||
scikit-build-core = callPackage ./specific-versions/scikit-build-core_0_10 {};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
nbPython3Packages = (python3.override {
|
nbPython3Packages = (python3.override {
|
||||||
|
|
|
||||||
|
|
@ -74,9 +74,9 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pyproject.toml \
|
substituteInPlace pyproject.toml \
|
||||||
--replace-fail 'twisted==23.10.0' 'twisted==24.7.0' \
|
--replace-fail 'twisted==23.10.0' 'twisted==24.11.0' \
|
||||||
--replace-fail 'service-identity==21.1.0' 'service-identity==24.1.0' \
|
--replace-fail 'service-identity==21.1.0' 'service-identity==24.2.0' \
|
||||||
--replace-fail 'cryptography==41.0.6' 'cryptography==43.0.1' \
|
--replace-fail 'cryptography==41.0.6' 'cryptography==44.0.2' \
|
||||||
--replace-fail 'txtorcon==23.11.0' 'txtorcon==24.8.0' \
|
--replace-fail 'txtorcon==23.11.0' 'txtorcon==24.8.0' \
|
||||||
|
|
||||||
# Modify pyproject.toml to include only specific modules. Do not include 'jmqtui'.
|
# Modify pyproject.toml to include only specific modules. Do not include 'jmqtui'.
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,6 @@ buildPythonPackage rec {
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace pyproject.toml \
|
substituteInPlace pyproject.toml \
|
||||||
--replace-fail 'cryptography = "^42"' 'cryptography = "43.0.1"'
|
--replace-fail 'cryptography = "^42"' 'cryptography = "44.0.2"'
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,87 +0,0 @@
|
||||||
# Copied from nixpkgs revision 673d99f1406cb09b8eb6feab4743ebdf70046557
|
|
||||||
{
|
|
||||||
lib,
|
|
||||||
buildPythonPackage,
|
|
||||||
fetchFromGitHub,
|
|
||||||
|
|
||||||
# build-system
|
|
||||||
cmake,
|
|
||||||
hatchling,
|
|
||||||
ninja,
|
|
||||||
pkg-config,
|
|
||||||
setuptools,
|
|
||||||
scikit-build-core,
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
asn1crypto,
|
|
||||||
cffi,
|
|
||||||
secp256k1,
|
|
||||||
|
|
||||||
# checks
|
|
||||||
pytestCheckHook,
|
|
||||||
pythonOlder,
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "coincurve";
|
|
||||||
version = "20.0.0";
|
|
||||||
pyproject = true;
|
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "ofek";
|
|
||||||
repo = "coincurve";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
hash = "sha256-NKx/iLuzFEu1UBuwa14x55Ab3laVAKEtX6dtoWi0dOg=";
|
|
||||||
};
|
|
||||||
|
|
||||||
postPatch = ''
|
|
||||||
# don't try to load .dll files
|
|
||||||
cp -r --no-preserve=mode ${secp256k1.src} libsecp256k1
|
|
||||||
patchShebangs secp256k1/autogen.sh
|
|
||||||
'';
|
|
||||||
|
|
||||||
build-system = [
|
|
||||||
hatchling
|
|
||||||
cffi
|
|
||||||
cmake
|
|
||||||
ninja
|
|
||||||
pkg-config
|
|
||||||
setuptools
|
|
||||||
scikit-build-core
|
|
||||||
];
|
|
||||||
|
|
||||||
dontUseCmakeConfigure = true;
|
|
||||||
|
|
||||||
env.COINCURVE_IGNORE_SYSTEM_LIB = "OFF";
|
|
||||||
|
|
||||||
buildInputs = [ secp256k1 ];
|
|
||||||
|
|
||||||
dependencies = [
|
|
||||||
asn1crypto
|
|
||||||
cffi
|
|
||||||
];
|
|
||||||
|
|
||||||
preCheck = ''
|
|
||||||
# https://github.com/ofek/coincurve/blob/master/tox.ini#L20-L22=
|
|
||||||
rm -rf coincurve
|
|
||||||
|
|
||||||
# don't run benchmark tests
|
|
||||||
rm tests/test_bench.py
|
|
||||||
'';
|
|
||||||
|
|
||||||
nativeCheckInputs = [ pytestCheckHook ];
|
|
||||||
|
|
||||||
pythonImportsCheck = [ "coincurve" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Cross-platform bindings for libsecp256k1";
|
|
||||||
homepage = "https://github.com/ofek/coincurve";
|
|
||||||
license = with licenses; [
|
|
||||||
asl20
|
|
||||||
mit
|
|
||||||
];
|
|
||||||
maintainers = [ ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,97 +0,0 @@
|
||||||
# Copied from nixpkgs revision 673d99f1406cb09b8eb6feab4743ebdf70046557
|
|
||||||
{
|
|
||||||
lib,
|
|
||||||
buildPythonPackage,
|
|
||||||
fetchFromGitHub,
|
|
||||||
pythonOlder,
|
|
||||||
|
|
||||||
# build-system
|
|
||||||
hatch-vcs,
|
|
||||||
hatchling,
|
|
||||||
cmake,
|
|
||||||
ninja,
|
|
||||||
|
|
||||||
# dependencies
|
|
||||||
packaging,
|
|
||||||
pathspec,
|
|
||||||
exceptiongroup,
|
|
||||||
|
|
||||||
# tests
|
|
||||||
build,
|
|
||||||
cattrs,
|
|
||||||
numpy,
|
|
||||||
pybind11,
|
|
||||||
pytest-subprocess,
|
|
||||||
pytestCheckHook,
|
|
||||||
setuptools,
|
|
||||||
tomli,
|
|
||||||
virtualenv,
|
|
||||||
wheel,
|
|
||||||
}:
|
|
||||||
|
|
||||||
buildPythonPackage rec {
|
|
||||||
pname = "scikit-build-core";
|
|
||||||
version = "0.10.5";
|
|
||||||
pyproject = true;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "scikit-build";
|
|
||||||
repo = "scikit-build-core";
|
|
||||||
rev = "refs/tags/v${version}";
|
|
||||||
hash = "sha256-hpwXEWPofgMT4ua2tZI1mtGbaBkT2XPBd6QL8xTi1A0=";
|
|
||||||
};
|
|
||||||
|
|
||||||
postPatch = lib.optionalString (pythonOlder "3.11") ''
|
|
||||||
substituteInPlace pyproject.toml \
|
|
||||||
--replace-fail '"error",' '"error", "ignore::UserWarning",'
|
|
||||||
'';
|
|
||||||
|
|
||||||
build-system = [
|
|
||||||
hatch-vcs
|
|
||||||
hatchling
|
|
||||||
];
|
|
||||||
|
|
||||||
dependencies =
|
|
||||||
[
|
|
||||||
packaging
|
|
||||||
pathspec
|
|
||||||
]
|
|
||||||
++ lib.optionals (pythonOlder "3.11") [
|
|
||||||
exceptiongroup
|
|
||||||
tomli
|
|
||||||
];
|
|
||||||
|
|
||||||
nativeCheckInputs = [
|
|
||||||
build
|
|
||||||
cattrs
|
|
||||||
cmake
|
|
||||||
ninja
|
|
||||||
numpy
|
|
||||||
pybind11
|
|
||||||
pytest-subprocess
|
|
||||||
pytestCheckHook
|
|
||||||
setuptools
|
|
||||||
virtualenv
|
|
||||||
wheel
|
|
||||||
];
|
|
||||||
|
|
||||||
# cmake is only used for tests
|
|
||||||
dontUseCmakeConfigure = true;
|
|
||||||
|
|
||||||
pytestFlagsArray = [ "-m 'not isolated and not network'" ];
|
|
||||||
|
|
||||||
disabledTestPaths = [
|
|
||||||
# store permissions issue in Nix:
|
|
||||||
"tests/test_editable.py"
|
|
||||||
];
|
|
||||||
|
|
||||||
pythonImportsCheck = [ "scikit_build_core" ];
|
|
||||||
|
|
||||||
meta = with lib; {
|
|
||||||
description = "Next generation Python CMake adaptor and Python API for plugins";
|
|
||||||
homepage = "https://github.com/scikit-build/scikit-build-core";
|
|
||||||
changelog = "https://github.com/scikit-build/scikit-build-core/releases/tag/v${version}";
|
|
||||||
license = with licenses; [ asl20 ];
|
|
||||||
maintainers = with maintainers; [ veprbl ];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{ lib
|
{ lib
|
||||||
, stdenvNoCC
|
, stdenvNoCC
|
||||||
, nodejs-18_x
|
, nodejs_22
|
||||||
, nodejs-slim-18_x
|
, nodejs-slim_22
|
||||||
, fetchNodeModules
|
, fetchNodeModules
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
, fetchurl
|
, fetchurl
|
||||||
|
|
@ -17,8 +17,8 @@ let self = stdenvNoCC.mkDerivation {
|
||||||
};
|
};
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
nodejs = nodejs-18_x;
|
nodejs = nodejs_22;
|
||||||
nodejsRuntime = nodejs-slim-18_x;
|
nodejsRuntime = nodejs-slim_22;
|
||||||
|
|
||||||
nodeModules = fetchNodeModules {
|
nodeModules = fetchNodeModules {
|
||||||
inherit (self) src nodejs;
|
inherit (self) src nodejs;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ set -euo pipefail
|
||||||
CACHIX_SIGNING_KEY="${CACHIX_SIGNING_KEY:-}"
|
CACHIX_SIGNING_KEY="${CACHIX_SIGNING_KEY:-}"
|
||||||
cachixCache=nix-bitcoin
|
cachixCache=nix-bitcoin
|
||||||
|
|
||||||
trap 'echo Error at line $LINENO' ERR
|
trap 'echo "Error at ${BASH_SOURCE[0]}:$LINENO"' ERR
|
||||||
|
|
||||||
tmpDir=$(mktemp -d -p /tmp)
|
tmpDir=$(mktemp -d -p /tmp)
|
||||||
trap 'rm -rf $tmpDir' EXIT
|
trap 'rm -rf $tmpDir' EXIT
|
||||||
|
|
@ -17,9 +17,10 @@ trap 'rm -rf $tmpDir' EXIT
|
||||||
## Instantiate
|
## Instantiate
|
||||||
|
|
||||||
time nix-instantiate "$@" --add-root "$tmpDir/drv" --indirect > /dev/null
|
time nix-instantiate "$@" --add-root "$tmpDir/drv" --indirect > /dev/null
|
||||||
printf "instantiated "; realpath "$tmpDir/drv"
|
drv=$(realpath "$tmpDir/drv")
|
||||||
|
echo "instantiated $drv"
|
||||||
|
|
||||||
outPath=$(nix-store --query "$tmpDir/drv")
|
outPath=$(nix-store --query "$drv")
|
||||||
if nix path-info --store "https://${cachixCache}.cachix.org" "$outPath" &>/dev/null; then
|
if nix path-info --store "https://${cachixCache}.cachix.org" "$outPath" &>/dev/null; then
|
||||||
echo "$outPath has already been built successfully."
|
echo "$outPath has already been built successfully."
|
||||||
exit 0
|
exit 0
|
||||||
|
|
@ -33,12 +34,12 @@ fi
|
||||||
|
|
||||||
if [[ $CACHIX_SIGNING_KEY ]]; then
|
if [[ $CACHIX_SIGNING_KEY ]]; then
|
||||||
# Speed up task by uploading store paths as soon as they are created
|
# Speed up task by uploading store paths as soon as they are created
|
||||||
buildCmd="cachix watch-exec $cachixCache nix-build --"
|
buildCmd="cachix watch-exec $cachixCache nix -- build"
|
||||||
else
|
else
|
||||||
buildCmd=nix-build
|
buildCmd="nix build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
$buildCmd --out-link "$tmpDir/result" "$tmpDir/drv" >/dev/null
|
$buildCmd --out-link "$tmpDir/result" --print-build-logs "$drv^*"
|
||||||
|
|
||||||
if [[ $CACHIX_SIGNING_KEY ]]; then
|
if [[ $CACHIX_SIGNING_KEY ]]; then
|
||||||
cachix push "$cachixCache" "$outPath"
|
cachix push "$cachixCache" "$outPath"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue