Skip to content

Commit 360b9b1

Browse files
committed
[DDW-1083] Remove some practically dead code
1 parent c15e9c3 commit 360b9b1

17 files changed

+186
-519
lines changed

ConfigMutator.hs

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

README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -150,12 +150,13 @@ Most of the commands need `nix` and will run only on Linux or macOS.
150150

151151
#### Updating upstream dependencies (cardano-wallet, cardano-node)
152152

153-
`Niv` is used to manage the version of upstream dependencies. The versions of these dependencies can be seen in `nix/sources.json`.
153+
Nix flake is used to manage the version of upstream dependencies. The versions of these dependencies can be seen in `flake.nix`.
154154

155-
Dependencies are updated with the follow nix commands:
156-
- Update cardano-wallet to the latest master: `nix develop .#default.devops --command niv update cardano-wallet`
157-
- Update cardano-wallet to a specific revision: `nix develop .#default.devops --command niv update cardano-wallet -a rev=91db88f9195de49d4fb4299c68fc3f6de09856ab`
158-
- Update cardano-node to a specific tag: `nix develop .#default.devops --command niv update cardano-node -b tags/1.20.0`
155+
Dependencies are updated in the `inputs` section of `flake.nix` followed with e.g.:
156+
157+
```
158+
nix flake lock --update-input cardano-wallet-unpatched
159+
```
159160

160161
### Cardano Wallet Api documentation
161162

@@ -247,7 +248,7 @@ Run:
247248

248249
If you want to run an Intel build from an Apple Silicon machine:
249250

250-
nix run -L .#package.mainnet
251+
nix run -L .#packages.x86_64-darwin.package.mainnet
251252

252253
## Installers
253254

flake.lock

Lines changed: 37 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
inputs = {
55
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-22.11-darwin";
66
cardano-wallet-unpatched.url = "github:input-output-hk/cardano-wallet/v2022-12-14";
7+
cardano-world.url = "github:input-output-hk/cardano-world/a0a315100ee320395be97fcc83f46678d5a7fb6e";
8+
cardano-world.flake = false; # otherwise, +19k quadratic dependencies in flake.lock…
9+
cardano-shell.url = "github:input-output-hk/cardano-shell/0d1d5f036c73d18e641412d2c58d4acda592d493";
10+
cardano-shell.flake = false;
711
tullia.url = "github:input-output-hk/tullia";
812
};
913

installers/default.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{ system ? builtins.currentSystem
22
, config ? {}
3-
, localLib ? import ../lib.nix {}
43
, pkgs
54
, daedalus-bridge
65
}:

installers/nix/linux.nix

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
, coreutils, utillinux, procps, cluster
33
, rawapp, daedalus-bridge, daedalus-installer
44
, sandboxed ? false
5-
, nodeImplementation
65
, launcherConfigs
76
, linuxClusterBinName
87
, gsettings-desktop-schemas

nix/launcher-config.nix

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
{ backend ? "cardano"
2-
, network ? "staging"
1+
{ network ? "staging"
32
, os ? "linux"
43
, cardanoLib
54
, runCommand
@@ -218,7 +217,7 @@ let
218217
networkName = if __hasAttr network clusterOverrides then clusterOverrides.${network}.networkName else network;
219218
isFlight = network == "mainnet_flight";
220219
isStaging = (envCfg.nodeConfig.RequiresNetworkMagic == "RequiresNoMagic");
221-
nodeImplementation = backend;
220+
nodeImplementation = "cardano";
222221
};
223222

224223
mkConfigFiles = nodeConfigFiles: launcherConfig: installerConfig:
@@ -347,5 +346,4 @@ let
347346
configFiles = mkConfigFiles nodeConfigFiles launcherConfig installerConfig;
348347
};
349348

350-
configs.cardano = mkConfigCardano;
351-
in configs.${backend}
349+
in mkConfigCardano

nix/new-common.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ rec {
88

99
oldCode = import ./old-default.nix {
1010
target = targetSystem;
11-
inherit inputs cluster sourceLib;
11+
inherit inputs cluster;
12+
devShell = false;
1213
};
1314

1415
inherit (oldCode) pkgs;

nix/old-default.nix

Lines changed: 11 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,14 @@
11
{ target
2-
, nodeImplementation ? "cardano"
3-
, cluster ? "mainnet"
4-
, version ? "versionNotSet"
5-
, devShell ? false
6-
, useLocalNode ? false
7-
, topologyOverride ? null
8-
, configOverride ? null
9-
, genesisOverride ? null
10-
, sourceLib
112
, inputs
3+
, cluster
4+
, devShell
125
}:
136

147
let
158
system = {
169
x86_64-windows = "x86_64-linux"; # Windows can only be cross-built from Linux now
1710
}.${target} or target;
1811
pkgs = inputs.nixpkgs.legacyPackages.${system};
19-
localLib = import ./old-lib.nix { inherit inputs system nodeImplementation; };
20-
sources = localLib.sources;
2112
flake-compat = import inputs.cardano-wallet-unpatched.inputs.flake-compat;
2213
walletFlake =
2314
if target != "aarch64-darwin"
@@ -39,51 +30,42 @@ let
3930
x86_64-darwin = macos.intel;
4031
aarch64-darwin = macos.silicon;
4132
}.${target};
42-
walletPkgs = walletFlake.legacyPackages.${system}.pkgs;
43-
cardanoWorldFlake = (flake-compat { src = sources.cardano-world; }).defaultNix.outputs;
44-
shellPkgs = (import "${sources.cardano-shell}/nix") { inherit system; };
45-
inherit (pkgs.lib) optionalString;
46-
crossSystem = lib: {
47-
x86_64-windows = lib.systems.examples.mingwW64;
33+
cardanoWorldFlake = (flake-compat { src = inputs.cardano-world; }).defaultNix.outputs;
34+
crossSystem = {
35+
x86_64-windows = pkgs.lib.systems.examples.mingwW64;
4836
}.${target} or null;
4937
ostable.x86_64-windows = "windows";
5038
ostable.x86_64-linux = "linux";
5139
ostable.x86_64-darwin = "macos64";
5240
ostable.aarch64-darwin = "macos64-arm";
5341

5442
packages = self: {
55-
inherit walletFlake cardanoWorldFlake cluster pkgs version target nodeImplementation;
56-
cardanoLib = walletPkgs.cardanoLib;
57-
daedalus-bridge = self.bridgeTable.${nodeImplementation};
43+
inherit walletFlake cardanoWorldFlake cluster pkgs target;
44+
inherit (walletFlake.legacyPackages.${system}.pkgs) cardanoLib;
45+
daedalus-bridge = self.callPackage ./cardano-bridge.nix {};
5846

59-
sources = localLib.sources;
60-
bridgeTable = {
61-
cardano = self.callPackage ./cardano-bridge.nix {};
62-
};
6347
inherit (walletPackages) cardano-wallet;
6448
inherit (walletPackages) cardano-address;
6549
inherit (walletPackages) mock-token-metadata-server;
66-
cardano-shell = import self.sources.cardano-shell { inherit system; crossSystem = crossSystem shellPkgs.lib; };
50+
cardano-shell = import inputs.cardano-shell { inherit system crossSystem; };
6751
local-cluster = if cluster == "selfnode" then walletPackages.local-cluster else null;
6852
cardano-node = walletPackages.cardano-node;
6953
cardanoNodeVersion = self.cardano-node.version + "-" + builtins.substring 0 9 self.cardano-node.src.rev;
7054
cardanoWalletVersion = self.daedalus-bridge.wallet-version + "-" + builtins.substring 0 9 walletFlake.rev;
7155
cardano-cli = walletPackages.cardano-cli;
7256

7357
launcherConfigs = self.callPackage ./launcher-config.nix {
74-
inherit devShell topologyOverride configOverride genesisOverride system;
58+
inherit devShell system;
7559
network = cluster;
7660
os = ostable.${target};
77-
backend = nodeImplementation;
7861
};
7962

8063
## TODO: move to installers/nix
8164
hsDaedalusPkgs = self.callPackage ../installers {
8265
inherit (self) daedalus-bridge;
83-
inherit localLib system;
66+
inherit system;
8467
};
8568
daedalus-installer = pkgs.haskell.lib.justStaticExecutables self.hsDaedalusPkgs.daedalus-installer;
86-
source = builtins.filterSource localLib.cleanSourceFilter ../.;
8769

8870
tests = {
8971
runShellcheck = self.callPackage ../tests/shellcheck.nix { src = ../.;};

nix/old-lib.nix

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

0 commit comments

Comments
 (0)