Skip to content

Commit

Permalink
Remove discontinued packages from nix
Browse files Browse the repository at this point in the history
  • Loading branch information
neilmayhew committed Oct 31, 2023
1 parent 08bcf37 commit 6510d1a
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 64 deletions.
2 changes: 0 additions & 2 deletions .buildkite/docker-build-push.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
# tag from the nix-build (../nix/docker.nix).

{ dockerImage
, submitApiDockerImage

# Build system's Nixpkgs. We use this so that we have the same docker
# version as the docker daemon.
Expand All @@ -19,7 +18,6 @@ with hostPkgs.lib;
let
images = map impureCreated [
dockerImage
submitApiDockerImage
];

# Override Docker image, setting its creation date to the current time rather than the unix epoch.
Expand Down
29 changes: 5 additions & 24 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@
# add some executables from other relevant packages
inherit (bech32.components.exes) bech32;
inherit (ouroboros-consensus-cardano.components.exes) db-analyser db-synthesizer db-truncater;
# add cardano-node and cardano-cli with their git revision stamp
# add cardano-node with its git revision stamp
cardano-node = set-git-rev project.exes.cardano-node;
cardano-cli = set-git-rev cardano-cli.components.exes.cardano-cli;
});

mkCardanoNodePackages = project: (collectExes project) // {
Expand Down Expand Up @@ -162,30 +161,17 @@
inherit pkgs;
};

checks = flattenTree project.checks //
# Linux only checks:
(optionalAttrs hostPlatform.isLinux (
prefixNamesWith "nixosTests/" (mapAttrs (_: v: v.${system} or v) nixosTests)
))
# checks run on default system only;
// (optionalAttrs (system == defaultSystem) {
hlint = pkgs.callPackage pkgs.hlintCheck {
inherit (project.args) src;
};
});
checks = flattenTree project.checks;

exes = (collectExes project) // {
inherit (pkgs) cabalProjectRegenerate checkCabalProject;
"dockerImages/push" = import ./.buildkite/docker-build-push.nix {
hostPkgs = import hostNixpkgs { inherit system; };
inherit (pkgs) dockerImage submitApiDockerImage;
inherit (pkgs) dockerImage;
};
"dockerImage/node/load" = pkgs.writeShellScript "load-docker-image" ''
docker load -i ${pkgs.dockerImage} $@
'';
"dockerImage/submit-api/load" = pkgs.writeShellScript "load-submit-docker-image" ''
docker load -i ${pkgs.submitApiDockerImage} $@
'';
} // flattenTree (pkgs.scripts // {
# `tests` are the test suites which have been built.
inherit (project) tests;
Expand All @@ -212,7 +198,6 @@
in
{
"dockerImage/node" = pkgs.dockerImage;
"dockerImage/submit-api" = pkgs.submitApiDockerImage;

## This is a very light profile, no caching&pinning needed.
workbench-ci-test =
Expand Down Expand Up @@ -265,7 +250,7 @@
roots.project = project.roots;
plan-nix.project = project.plan-nix;
};
profiled = lib.genAttrs [ "cardano-node" "tx-generator" "locli" ] (n:
profiled = lib.genAttrs [ "cardano-node" ] (n:
packages.${n}.passthru.profiled
);
asserted = lib.genAttrs [ "cardano-node" ] (n:
Expand Down Expand Up @@ -414,17 +399,13 @@
customConfig.haskellNix
];
cardanoNodePackages = mkCardanoNodePackages final.cardanoNodeProject;
inherit (final.cardanoNodePackages) cardano-node cardano-cli cardano-submit-api cardano-tracer bech32 locli db-analyser;
inherit (final.cardanoNodePackages) cardano-node bech32 db-analyser;
};
nixosModules = {
cardano-node = { pkgs, lib, ... }: {
imports = [ ./nix/nixos/cardano-node-service.nix ];
services.cardano-node.cardanoNodePackages = lib.mkDefault (mkCardanoNodePackages flake.project.${pkgs.system});
};
cardano-submit-api = { pkgs, lib, ... }: {
imports = [ ./nix/nixos/cardano-submit-api-service.nix ];
services.cardano-submit-api.cardanoNodePackages = lib.mkDefault (mkCardanoNodePackages flake.project.${pkgs.system});
};
};
};
}
8 changes: 1 addition & 7 deletions nix/cardanolib-py/default.nix
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
{
python3Packages
, cardano-cli
}:
{ python3Packages }:

python3Packages.buildPythonPackage {
version = "1.0.0";
pname = "cardano-lib-py";
src = ./.;
propagatedBuildInputs = [
cardano-cli
];
}
3 changes: 0 additions & 3 deletions nix/docker/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
, dockerTools

# The main contents of the image.
, cardano-cli
, cardano-node
, scripts

Expand Down Expand Up @@ -65,7 +64,6 @@ let
name = "image-root";
pathsToLink = ["/"];
paths = [
cardano-cli # Provide cardano-cli capability
bashInteractive # Provide the BASH shell
cacert # X.509 certificates of public CA's
coreutils # Basic utilities expected in GNU OS's
Expand Down Expand Up @@ -133,7 +131,6 @@ in
cp ${runNetwork}/bin/* usr/local/bin
cp ${context}/bin/* usr/local/bin
ln -s ${cardano-node}/bin/cardano-node usr/local/bin/cardano-node
ln -s ${cardano-cli}/bin/cardano-cli usr/local/bin/cardano-cli
'';
config = {
EntryPoint = [ "entrypoint" ];
Expand Down
1 change: 0 additions & 1 deletion nix/nixos/module-list.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[
./cardano-node-service.nix
./cardano-submit-api-service.nix
]
19 changes: 1 addition & 18 deletions nix/pkgs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ in with final;

cardanolib-py = callPackage ./cardanolib-py { };

scripts = lib.recursiveUpdate (import ./scripts.nix { inherit pkgs; })
(import ./scripts-submit-api.nix { inherit pkgs; });
scripts = import ./scripts.nix { inherit pkgs; };

clusterTests = import ./workbench/tests { inherit pkgs; };

Expand All @@ -113,22 +112,6 @@ in with final;
script = "node";
};

submitApiDockerImage =
let
defaultConfig = {
socketPath = "/node-ipc/node.socket";
listenAddress = "0.0.0.0";
};
in
callPackage ./docker/submit-api.nix {
exe = "cardano-submit-api";
scripts = import ./scripts-submit-api.nix {
inherit pkgs;
customConfigs = [ defaultConfig customConfig ];
};
script = "submit-api";
};

all-profiles-json = workbench.profile-names-json;

# Disable failing python uvloop tests
Expand Down
3 changes: 0 additions & 3 deletions nix/workbench/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ let
jq
moreutils
procps
cardano-cli
cardano-topology
] ++ lib.optional (!pkgs.stdenv.hostPlatform.isDarwin) db-analyser
++ [ locli ]
);

runWorkbench =
Expand Down
2 changes: 1 addition & 1 deletion nix/workbench/profile/profile.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ let
pkgs.runCommand "workbench-topology-${profileName}"
{ requiredSystemFeatures = [ "benchmark" ];
nativeBuildInputs = with pkgs.haskellPackages; with pkgs;
[ bash cardano-cli coreutils gnused jq moreutils workbench.workbench ];
[ bash coreutils gnused jq moreutils workbench.workbench ];
}
''
mkdir $out
Expand Down
5 changes: 0 additions & 5 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,8 @@ let

nativeBuildInputs = with cardanoNodePackages; [
nix
cardano-cli
bech32
cardano-node
cardano-topology
cardano-tracer
locli
tx-generator
pkgs.graphviz
python3Packages.supervisor
python3Packages.ipython
Expand Down

0 comments on commit 6510d1a

Please sign in to comment.