Skip to content

Commit

Permalink
feat: update packages locally
Browse files Browse the repository at this point in the history
  • Loading branch information
tgunnoe committed Sep 23, 2024
1 parent a19da17 commit 7a71064
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 27 deletions.
54 changes: 36 additions & 18 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
url = "github:IntersectMBO/cardano-db-sync/13.5.0.2";
flake = false;
};
cardano-nix = {
url = "github:tgunnoe/cardano.nix/add-darwin";
kupo = {
url = "github:CardanoSolutions/kupo/v2.9.0";
flake = false;
};
ogmios = {
url = "github:CardanoSolutions/ogmios/v6.6.1";
flake = false;
};
configurations = {
Expand All @@ -57,7 +61,7 @@
inputs.devshell.flakeModule
inputs.process-compose.flakeModule
./nix/shell.nix
./nix/packages.nix
./nix/packages
./nix/processes.nix
];
flake.lib = import ./nix/lib.nix {inherit (nixpkgs) lib;};
Expand Down
10 changes: 4 additions & 6 deletions nix/packages.nix → nix/packages/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,22 @@
system,
...
}: let

# These need to be specified because cardano.nix provides multiples
kupoVersion = "2.9.0";
ogmiosVersion = "6.5.0";
ogmiosVersion = "6.6.1";

flake-compat = import inputs.flake-compat;
cardanoPackages = (flake-compat { src = inputs.cardano-node; }).defaultNix.packages.${system};
dbSyncPackages = (flake-compat { src = inputs.cardano-dbsync; }).defaultNix.packages.${system};
smartContractsPkgs = (flake-compat { src = inputs.smart-contracts; }).defaultNix.packages.${system};
cardanoExtraPkgs = (flake-compat { src = inputs.cardano-nix; }).defaultNix.packages.${system};
#cardanoExtraPkgs = (flake-compat { src = inputs.cardano-nix; }).defaultNix.packages.${system};

in {
packages = {
inherit (smartContractsPkgs) pc-contracts-cli;
inherit (cardanoPackages) cardano-node cardano-cli cardano-testnet;
inherit (dbSyncPackages) "cardano-db-sync:exe:cardano-db-sync";
kupo = cardanoExtraPkgs."kupo-${kupoVersion}";
ogmios = cardanoExtraPkgs."ogmios-${ogmiosVersion}";
kupo = pkgs.callPackage ./kupo.nix { version = kupoVersion; };
ogmios = pkgs.callPackage ./ogmios.nix { version = ogmiosVersion; };
partnerchains-stack = pkgs.stdenv.mkDerivation {
name = "partnerchains-stack";
phases = [ "installPhase" ];
Expand Down
24 changes: 24 additions & 0 deletions nix/packages/kupo.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{ fetchzip, stdenv, version, ... }:

let

kupoLinux = fetchzip {
url = "https://github.com/CardanoSolutions/kupo/releases/download/v2.9/kupo-v${version}-x86_64-linux.zip";
hash = "sha256:sEfaFPph1qBuPrxQzFeTKU/9i9w0KF/v7GpxxmorPWQ=";
stripRoot = false;
version = "${version}";
name = "kupo-${version}";
postFetch = "chmod +x $out/bin/kupo";
};

kupoDarwin = fetchzip {
url = "https://github.com/CardanoSolutions/kupo/releases/download/v2.9/kupo-v${version}-aarch64-macos.zip";
hash = "sha256:1d18mpvmjiafy56pjljf46r1nh7ma44k29jzwk3bpr22ra9dvi0x";
stripRoot = false;
version = "${version}";
name = "kupo-${version}";
postFetch = "chmod +x $out/bin/kupo";
};

in
if stdenv.isDarwin then kupoDarwin else kupoLinux
22 changes: 22 additions & 0 deletions nix/packages/ogmios.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ fetchzip, stdenv, version, ... }:
let
ogmiosLinux = fetchzip {
url = "https://github.com/CardanoSolutions/ogmios/releases/download/v${version}/ogmios-v${version}-x86_64-linux.zip";
hash = "sha256-C7vwUefYXCXhnfIUt/Kmj3/f4cd3IogAZxaBtDftUOU=";
stripRoot = false;
version = "${version}";
name = "ogmios-${version}";
postFetch = "chmod +x $out/bin/ogmios";
};

ogmiosDarwin = fetchzip {
url = "https://github.com/CardanoSolutions/ogmios/releases/download/v${version}/ogmios-v${version}-aarch64-macos.zip";
hash = "sha256-Y97GwNW7/c+zW+XEsLEdFPKG0WPBhLDswz9ij9cYHgs=";
stripRoot = false;
version = "${version}";
name = "ogmios-${version}";
postFetch = "chmod +x $out/bin/ogmios";
};

in
if stdenv.isLinux then ogmiosLinux else ogmiosDarwin

0 comments on commit 7a71064

Please sign in to comment.