Skip to content

Commit 1b51323

Browse files
committed
[DDW-1151] Fix remaining impurities
1 parent 6a82fdc commit 1b51323

File tree

7 files changed

+18
-33
lines changed

7 files changed

+18
-33
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,14 @@ Most of the commands need `nix` and will run only on Linux or macOS.
159159
- `yarn install`
160160
- `yarn dev:windows`
161161

162-
#### Updating upstream dependencies (cardano-wallet, cardano-node, and iohk-nix)
162+
#### Updating upstream dependencies (cardano-wallet, cardano-node)
163163

164164
`Niv` is used to manage the version of upstream dependencies. The versions of these dependencies can be seen in `nix/sources.json`.
165165

166166
Dependencies are updated with the follow nix commands:
167167
- Update cardano-wallet to the latest master: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-wallet"`
168168
- Update cardano-wallet to a specific revision: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-wallet -a rev=91db88f9195de49d4fb4299c68fc3f6de09856ab"`
169169
- Update cardano-node to a specific tag: `nix-shell -A devops --arg nivOnly true --run "niv update cardano-node -b tags/1.20.0"`
170-
- Update iohk-nix to the latest master: `nix-shell -A devops --arg nivOnly true --run "niv update iohk-nix -b master"`
171170

172171
#### Notes
173172

default.nix

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,20 @@ let
4343
patch -p1 -i ${./nix/cardano-wallet--enable-aarch64-darwin.patch}
4444
'';
4545
};
46-
haskell-nix = walletFlake.defaultNix.inputs.haskellNix.legacyPackages.${system}.haskell-nix;
46+
haskell-nix = walletFlake.inputs.haskellNix.legacyPackages.${system}.haskell-nix;
4747
flake-compat = import sources.flake-compat;
48-
walletFlake = flake-compat { src = sources.cardano-wallet; };
49-
walletPackages = with walletFlake.defaultNix.hydraJobs; {
48+
walletFlake = (flake-compat { src = sources.cardano-wallet; }).defaultNix;
49+
walletPackages = with walletFlake.hydraJobs; {
5050
x86_64-windows = linux.windows;
5151
x86_64-linux = linux.native;
5252
x86_64-darwin = macos.intel;
5353
aarch64-darwin = macos.silicon;
5454
}.${target};
55-
walletPkgs = import "${sources.cardano-wallet}/nix" {};
55+
walletPkgs = walletFlake.legacyPackages.${system}.pkgs;
5656
cardanoWorldFlake = (flake-compat { src = sources.cardano-world; }).defaultNix.outputs;
5757
# only used for CLI, to be removed when upgraded to next node version
5858
nodePkgs = import "${sources.cardano-node}/nix" {};
59-
shellPkgs = (import "${sources.cardano-shell}/nix") {};
59+
shellPkgs = (import "${sources.cardano-shell}/nix") { inherit system; };
6060
inherit (pkgs.lib) optionalString optional concatStringsSep;
6161
inherit (pkgs) writeTextFile;
6262
crossSystem = lib: (crossSystemTable lib).${target} or null;
@@ -73,7 +73,7 @@ let
7373

7474
packages = self: {
7575
inherit walletFlake cardanoWorldFlake cluster pkgs version target nodeImplementation;
76-
cardanoLib = localLib.iohkNix.cardanoLib;
76+
cardanoLib = walletPkgs.cardanoLib;
7777
daedalus-bridge = self.bridgeTable.${nodeImplementation};
7878

7979
nodejs = let

flake.nix

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,16 @@
5151
// (let
5252
x86_64-linux = inputs.tullia.fromSimple "x86_64-linux" (import ./nix/tullia.nix inputs.self "x86_64-linux");
5353
x86_64-darwin = inputs.tullia.fromSimple "x86_64-darwin" (import ./nix/tullia.nix inputs.self "x86_64-darwin");
54+
fakeEvent = { inputs={"GitHub event".value = {github_body.head_commit.id="0000000";};}; id=""; ociRegistry=""; };
5455
in {
5556
tullia.x86_64-linux = x86_64-linux.tullia;
5657
cicero.x86_64-linux = x86_64-linux.cicero;
5758
tullia.x86_64-darwin = x86_64-darwin.tullia;
5859
cicero.x86_64-darwin = x86_64-darwin.cicero;
60+
61+
ciceroLocalTest.x86_64-linux = (x86_64-linux.cicero."daedalus/ci" fakeEvent).job;
62+
ciceroLocalTest.x86_64-darwin = (x86_64-darwin.cicero."daedalus/ci" fakeEvent).job;
63+
5964
});
6065
# --- Flake Local Nix Configuration ----------------------------
6166
nixConfig = {

iohk-nix.json

Lines changed: 0 additions & 6 deletions
This file was deleted.

lib.nix

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
let
66
sources = import ./nix/sources.nix;
7-
iohkNix = import sources.iohk-nix { sourcesOverride = sources; };
87
nixpkgs = import sources.nixpkgs { sourcesOverride = sources; inherit system; };
9-
# TODO: can we use the filter in iohk-nix instead?
8+
# TODO: can we use the filter in cardano-wallet instead?
109
cleanSourceFilter = with pkgs.stdenv;
1110
name: type: let baseName = baseNameOf (toString name); in ! (
1211
# Filter out .git repo
@@ -32,5 +31,5 @@ let
3231
lib = pkgs.lib;
3332
in
3433
lib // {
35-
inherit sources iohkNix pkgs isDaedalus cleanSourceFilter;
34+
inherit sources pkgs isDaedalus cleanSourceFilter;
3635
}

nix/sources.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,18 +71,6 @@
7171
"url": "https://github.com/hercules-ci/gitignore/archive/f9e996052b5af4032fe6150bba4a6fe4f7b9d698.tar.gz",
7272
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
7373
},
74-
"iohk-nix": {
75-
"branch": "master",
76-
"description": "nix scripts shared across projects",
77-
"homepage": null,
78-
"owner": "input-output-hk",
79-
"repo": "iohk-nix",
80-
"rev": "266ca46a8d1cb4286b9699b4fd435066e88440ac",
81-
"sha256": "132fbnnpp7bbfqv3dgvn9xi9dc1gsn9mivbqnxmglgmlv4lmrad8",
82-
"type": "tarball",
83-
"url": "https://github.com/input-output-hk/iohk-nix/archive/266ca46a8d1cb4286b9699b4fd435066e88440ac.tar.gz",
84-
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
85-
},
8674
"js-chain-libs": {
8775
"branch": "master",
8876
"description": "chain-libs javascript SDK",

shell.nix

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{ system ? builtins.currentSystem
22
, config ? {}
33
, nodeImplementation ? "cardano"
4-
, localLib ? import ./lib.nix { inherit nodeImplementation; }
4+
, localLib ? import ./lib.nix { inherit nodeImplementation system; }
55
, pkgs ? import (import ./nix/sources.nix).nixpkgs { inherit system config; }
66
, cluster ? "selfnode"
77
, systemStart ? null
@@ -20,9 +20,9 @@ let
2020
daedalusPkgs = import ./. {
2121
inherit nodeImplementation cluster topologyOverride configOverride genesisOverride useLocalNode;
2222
target = system;
23+
localLibSystem = system;
2324
devShell = true;
2425
};
25-
hostPkgs = import pkgs.path { config = {}; overlays = []; };
2626
fullExtraArgs = walletExtraArgs ++ pkgs.lib.optional allowFaultInjection "--allow-fault-injection";
2727
launcherConfig' = "${daedalusPkgs.daedalus.cfg}/etc/launcher-config.yaml";
2828
fixYarnLock = pkgs.stdenv.mkDerivation {
@@ -77,7 +77,7 @@ let
7777

7878
gcRoot = pkgs.runCommandLocal "gc-root" {
7979
properBuildShell = buildShell.overrideAttrs (old: { buildCommand = "export >$out"; });
80-
cardanoWalletsHaskellNix = daedalusPkgs.walletFlake.defaultNix.outputs.legacyPackages.${system}.roots;
80+
cardanoWalletsHaskellNix = daedalusPkgs.walletFlake.outputs.legacyPackages.${system}.roots;
8181
ourHaskellNix = if pkgs.stdenv.isLinux then daedalusPkgs.yaml2json.project.roots else "";
8282
daedalusInstallerInputs = with daedalusPkgs.daedalus-installer; buildInputs ++ nativeBuildInputs;
8383
# cardano-bridge inputs are GC’d, and rebuilt too often on Apple M1 CI:
@@ -194,7 +194,7 @@ let
194194
devops = pkgs.stdenv.mkDerivation {
195195
name = "devops-shell";
196196
buildInputs = let
197-
inherit (localLib.iohkNix) niv;
197+
inherit (daedalusPkgs.walletFlake.outputs.legacyPackages.${system}.pkgs) niv;
198198
in if nivOnly then [ niv ] else [ niv daedalusPkgs.cardano-node-cluster.start daedalusPkgs.cardano-node-cluster.stop ];
199199
shellHook = ''
200200
export CARDANO_NODE_SOCKET_PATH=$(pwd)/state-cluster/bft1.socket

0 commit comments

Comments
 (0)