Merge #166: Update nixpkgs (stable 19.09 -> 20.03)
b9f07bf706
test: use older qemu version for travis compatibility (Erik Arvstedt)026a22fcee
use python testing from stable nixpkgs (Erik Arvstedt)45de0d427d
Travis: test electrs with unstable nixpkgs as well (Jonas Nick)2d3a1e839e
electrs: fix conditional cargoSha256 (Erik Arvstedt)f5dbac318d
nixops: fix format exception from upstream nixops (Jonas Nick)c03ad1ccfa
Update nixpkgs (stable 19.09 -> 20.03) (Jonas Nick)b7047c7286
HWI: allow building with unstable nixpkgs (Jonas Nick) Pull request description: ACKs for top commit: nixbitcoin: ACKb9f07bf706
Tree-SHA512: 20766cdbe465d01b4d503e76741307a7fba403db575869c1f9cf401941b05d5afa7db735772ac235cf88a35b8e4ce49f888adfa5ee9891d4264b5ed570baaca9
This commit is contained in:
commit
ca2834a6a2
@ -21,6 +21,7 @@ env:
|
|||||||
jobs:
|
jobs:
|
||||||
- TestModules=1 STABLE=1
|
- TestModules=1 STABLE=1
|
||||||
- PKG=hwi STABLE=1
|
- PKG=hwi STABLE=1
|
||||||
|
- PKG=hwi STABLE=0
|
||||||
- PKG=lightning-charge STABLE=1
|
- PKG=lightning-charge STABLE=1
|
||||||
- PKG=lightning-charge STABLE=0
|
- PKG=lightning-charge STABLE=0
|
||||||
- PKG=nanopos STABLE=1
|
- PKG=nanopos STABLE=1
|
||||||
@ -29,8 +30,7 @@ env:
|
|||||||
- PKG=elementsd STABLE=1
|
- PKG=elementsd STABLE=1
|
||||||
- PKG=elementsd STABLE=0
|
- PKG=elementsd STABLE=0
|
||||||
- PKG=electrs STABLE=1
|
- PKG=electrs STABLE=1
|
||||||
# broken
|
- PKG=electrs STABLE=0
|
||||||
# - PKG=electrs STABLE=0
|
|
||||||
- PKG=liquid-swap STABLE=1
|
- PKG=liquid-swap STABLE=1
|
||||||
- PKG=nixops19_09 STABLE=1
|
- PKG=nixops19_09 STABLE=1
|
||||||
script:
|
script:
|
||||||
|
@ -13,8 +13,8 @@ rustPlatform.buildRustPackage rec {
|
|||||||
nativeBuildInputs = [ llvmPackages.clang ];
|
nativeBuildInputs = [ llvmPackages.clang ];
|
||||||
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
LIBCLANG_PATH = "${llvmPackages.libclang}/lib";
|
||||||
|
|
||||||
cargoSha256 = if pkgs ? cargo-vendor then
|
cargoSha256 = if builtins.pathExists "${pkgs.path}/pkgs/build-support/rust/fetchcargo.nix" then
|
||||||
# nixpkgs ≤ 19.09
|
# nixpkgs ≤ 20.03
|
||||||
"19qs8if8fmygv6j74s6iwzm534fybwasjvmzdqcl996xhg75w6gi"
|
"19qs8if8fmygv6j74s6iwzm534fybwasjvmzdqcl996xhg75w6gi"
|
||||||
else
|
else
|
||||||
# for recent nixpkgs with cargo-native vendoring (introduced in nixpkgs PR #69274)
|
# for recent nixpkgs with cargo-native vendoring (introduced in nixpkgs PR #69274)
|
||||||
|
@ -1,12 +1,18 @@
|
|||||||
{ stdenv, fetchurl, fetchFromGitHub, python3 }:
|
{ stdenv, fetchurl, fetchFromGitHub, python3 }:
|
||||||
|
|
||||||
with stdenv.lib;
|
with stdenv.lib;
|
||||||
with python3.pkgs;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
buildInputs = [ mnemonic ecdsa typing-extensions hidapi libusb1 pyaes ];
|
python = python3.override {
|
||||||
|
packageOverrides = self: super: {
|
||||||
|
# HWI requires mnemonic <0.19 but nixpkgs has a newer version
|
||||||
|
mnemonic = self.callPackage ./mnemonic {};
|
||||||
|
# HWI requires ecdsa <0.14 but nixpkgs has a newer version
|
||||||
|
ecdsa = self.callPackage ./ecdsa {};
|
||||||
|
};
|
||||||
|
};
|
||||||
in
|
in
|
||||||
buildPythonPackage rec {
|
python.pkgs.buildPythonPackage rec {
|
||||||
pname = "hwi";
|
pname = "hwi";
|
||||||
version = "1.0.3";
|
version = "1.0.3";
|
||||||
|
|
||||||
@ -20,8 +26,7 @@ buildPythonPackage rec {
|
|||||||
# TODO: enable tests
|
# TODO: enable tests
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
inherit buildInputs;
|
propagatedBuildInputs = with python.pkgs; [ mnemonic ecdsa typing-extensions hidapi libusb1 pyaes ];
|
||||||
propagatedBuildInputs = buildInputs;
|
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = https://github.com/bitcoin-core/hwi;
|
homepage = https://github.com/bitcoin-core/hwi;
|
||||||
|
28
pkgs/hwi/ecdsa/default.nix
Normal file
28
pkgs/hwi/ecdsa/default.nix
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
{ stdenv
|
||||||
|
, buildPythonPackage
|
||||||
|
, fetchPypi
|
||||||
|
, pkgs
|
||||||
|
, six
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "ecdsa";
|
||||||
|
version = "0.13.3";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "163c80b064a763ea733870feb96f9dd9b92216cfcacd374837af18e4e8ec3d4d";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ six ];
|
||||||
|
# Only needed for tests
|
||||||
|
checkInputs = [ pkgs.openssl ];
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "ECDSA cryptographic signature library";
|
||||||
|
homepage = "https://github.com/warner/python-ecdsa";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ aszlig ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
20
pkgs/hwi/mnemonic/default.nix
Normal file
20
pkgs/hwi/mnemonic/default.nix
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{ lib, fetchPypi, buildPythonPackage, pbkdf2 }:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "mnemonic";
|
||||||
|
version = "0.18";
|
||||||
|
|
||||||
|
src = fetchPypi {
|
||||||
|
inherit pname version;
|
||||||
|
sha256 = "02a7306a792370f4a0c106c2cf1ce5a0c84b9dbd7e71c6792fdb9ad88a727f1d";
|
||||||
|
};
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ pbkdf2 ];
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Implementation of Bitcoin BIP-0039";
|
||||||
|
homepage = "https://github.com/trezor/python-mnemonic";
|
||||||
|
license = lib.licenses.mit;
|
||||||
|
maintainers = with lib.maintainers; [ np ];
|
||||||
|
};
|
||||||
|
}
|
@ -43,7 +43,6 @@
|
|||||||
('destDir', 'string'),
|
('destDir', 'string'),
|
||||||
('user', 'string'),
|
('user', 'string'),
|
||||||
('group', 'string'),
|
('group', 'string'),
|
||||||
|
|
||||||
--- a/nixops/ssh_util.py
|
--- a/nixops/ssh_util.py
|
||||||
+++ b/nixops/ssh_util.py
|
+++ b/nixops/ssh_util.py
|
||||||
@@ -278,6 +278,7 @@ class SSH(object):
|
@@ -278,6 +278,7 @@ class SSH(object):
|
||||||
@ -54,3 +53,15 @@
|
|||||||
master = self.get_master(flags, timeout, user)
|
master = self.get_master(flags, timeout, user)
|
||||||
flags = flags + self._get_flags()
|
flags = flags + self._get_flags()
|
||||||
if logged:
|
if logged:
|
||||||
|
|
||||||
|
--- a/nixops/deployment.py
|
||||||
|
+++ b/nixops/deployment.py
|
||||||
|
@@ -748,6 +748,6 @@
|
||||||
|
if res == 100 or force_reboot or m.state == m.RESCUE:
|
||||||
|
if not allow_reboot and not force_reboot:
|
||||||
|
raise Exception("the new configuration requires a "
|
||||||
|
- "reboot to take effect (hint: use "
|
||||||
|
+ "reboot of '{}' to take effect (hint: use "
|
||||||
|
"‘--allow-reboot’)".format(m.name))
|
||||||
|
m.reboot_sync()
|
||||||
|
res = 0
|
@ -8,11 +8,11 @@ in
|
|||||||
{
|
{
|
||||||
# To update, run ../helper/fetch-channel REV
|
# To update, run ../helper/fetch-channel REV
|
||||||
nixpkgs = fetch {
|
nixpkgs = fetch {
|
||||||
rev = "839cd8d03aa55f067e23a64097fc5b7d7e02f468";
|
rev = "95b9c99f6d091273572ff1ec62b97b6ad3f68bdf";
|
||||||
sha256 = "1w0xklkk9lbwvrx02gng71pyf476h223098692pji5wg5l0sgm02";
|
sha256 = "1qcwr9binkwfayix88aljwssxi5djkwscx0rnwlk1yp9q60rgp3d";
|
||||||
};
|
};
|
||||||
nixpkgs-unstable = fetch {
|
nixpkgs-unstable = fetch {
|
||||||
rev = "7c2fc1ce23a805f3220d867f528ceb9bd848d2e1";
|
rev = "22a3bf9fb9edad917fb6cd1066d58b5e426ee975";
|
||||||
sha256 = "1g562hlp5ha11a41daav9bnq86n4nmbm3xzhpzmma8c4jn4k2p8y";
|
sha256 = "089hqg2r2ar5piw9q5z3iv0qbmfjc4rl5wkx9z16aqnlras72zsa";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -1,25 +1,17 @@
|
|||||||
testArgs:
|
testArgs:
|
||||||
|
|
||||||
let
|
let
|
||||||
stablePkgs = import <nixpkgs> { config = {}; overlays = []; };
|
pkgs = import <nixpkgs> { config = {}; overlays = []; };
|
||||||
unstable = (import ../pkgs/nixpkgs-pinned.nix).nixpkgs-unstable;
|
|
||||||
|
|
||||||
# Stable nixpkgs doesn't yet include the Python testing framework.
|
pkgs19_09 = import (pkgs.fetchzip {
|
||||||
# Use unstable nixpkgs and patch it so that it uses stable nixpkgs for the VM
|
url = "https://github.com/NixOS/nixpkgs-channels/archive/a7ceb2536ab11973c59750c4c48994e3064a75fa.tar.gz";
|
||||||
# machine configuration.
|
sha256 = "0hka65f31njqpq7i07l22z5rs7lkdfcl4pbqlmlsvnysb74ynyg1";
|
||||||
testingPkgs =
|
}) { config = {}; overlays = []; };
|
||||||
stablePkgs.runCommand "nixpkgs-testing" {} ''
|
|
||||||
cp -r ${unstable} $out
|
|
||||||
cd $out
|
|
||||||
chmod +w -R .
|
|
||||||
patch -p1 < ${./use-stable-pkgs.patch}
|
|
||||||
'';
|
|
||||||
|
|
||||||
test = (import "${testingPkgs}/nixos/tests/make-test-python.nix") testArgs;
|
test = (import "${pkgs.path}/nixos/tests/make-test-python.nix") testArgs;
|
||||||
|
|
||||||
fixedTest = { system ? builtins.currentSystem, ... }@args:
|
fixedTest = { system ? builtins.currentSystem, ... }@args:
|
||||||
let
|
let
|
||||||
pkgs = (import testingPkgs { inherit system; config = {}; overlays = []; } );
|
|
||||||
pkgsFixed = pkgs // {
|
pkgsFixed = pkgs // {
|
||||||
# Fix the black Python code formatter that's used in the test to allow the test
|
# Fix the black Python code formatter that's used in the test to allow the test
|
||||||
# script to have longer lines. The default width of 88 chars is too restrictive for
|
# script to have longer lines. The default width of 88 chars is too restrictive for
|
||||||
@ -35,7 +27,7 @@ let
|
|||||||
# QEMU 4.20 from unstable fails on Travis build nodes with message
|
# QEMU 4.20 from unstable fails on Travis build nodes with message
|
||||||
# "error: failed to set MSR 0x48b to 0x159ff00000000"
|
# "error: failed to set MSR 0x48b to 0x159ff00000000"
|
||||||
# Use version 4.0.1 instead.
|
# Use version 4.0.1 instead.
|
||||||
inherit (stablePkgs) qemu_test;
|
inherit (pkgs19_09) qemu_test;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
test (args // { pkgs = pkgsFixed; });
|
test (args // { pkgs = pkgsFixed; });
|
||||||
|
@ -1,28 +0,0 @@
|
|||||||
--- a/nixos/lib/build-vms.nix
|
|
||||||
+++ b/nixos/lib/build-vms.nix
|
|
||||||
@@ -30,10 +30,10 @@ rec {
|
|
||||||
buildVM =
|
|
||||||
nodes: configurations:
|
|
||||||
|
|
||||||
- import ./eval-config.nix {
|
|
||||||
+ import <nixpkgs/nixos/lib/eval-config.nix> {
|
|
||||||
inherit system;
|
|
||||||
modules = configurations ++ extraConfigurations;
|
|
||||||
- baseModules = (import ../modules/module-list.nix) ++
|
|
||||||
+ baseModules = (import <nixpkgs/nixos/modules/module-list.nix>) ++
|
|
||||||
[ ../modules/virtualisation/qemu-vm.nix
|
|
||||||
../modules/testing/test-instrumentation.nix # !!! should only get added for automated test runs
|
|
||||||
{ key = "no-manual"; documentation.nixos.enable = false; }
|
|
||||||
|
|
||||||
|
|
||||||
services.connman doesn't exist in stable nixpkgs
|
|
||||||
--- a/nixos/modules/virtualisation/qemu-vm.nix
|
|
||||||
+++ b/nixos/modules/virtualisation/qemu-vm.nix
|
|
||||||
@@ -620,7 +620,6 @@ in
|
|
||||||
|
|
||||||
# Wireless won't work in the VM.
|
|
||||||
networking.wireless.enable = mkVMOverride false;
|
|
||||||
- services.connman.enable = mkVMOverride false;
|
|
||||||
|
|
||||||
# Speed up booting by not waiting for ARP.
|
|
||||||
networking.dhcpcd.extraConfig = "noarp";
|
|
Loading…
Reference in New Issue
Block a user