Skip to content
This repository has been archived by the owner on Sep 16, 2024. It is now read-only.

Commit

Permalink
flake: update and fix template
Browse files Browse the repository at this point in the history
  • Loading branch information
marijanp committed Mar 6, 2024
1 parent 60ec2cb commit b136568
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
9 changes: 3 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,17 +52,14 @@
// eachDefaultSystem (system:
let
pkgs-risc0-rustc = inputs.nixpkgs-risc0-rustc.legacyPackages.${system};
rustc0 = pkgs-risc0-rustc.callPackage ./pkgs/rustc0 { };

pkgs = nixpkgs.legacyPackages.${system};
risc0pkgs = pkgs.recurseIntoAttrs (pkgs.callPackage ./pkgs { });
lib = pkgs.recurseIntoAttrs (pkgs.callPackage ./lib { pkgs = pkgs // risc0pkgs // { inherit rustc0; }; });
risc0pkgs = pkgs.recurseIntoAttrs (pkgs.callPackage ./pkgs { inherit pkgs-risc0-rustc; });
lib = pkgs.recurseIntoAttrs (pkgs.callPackage ./lib { pkgs = pkgs // risc0pkgs; });
in
{
inherit lib;
packages = {
inherit (risc0pkgs) r0vm;
inherit rustc0;
inherit (risc0pkgs) r0vm rustc0;
};

formatter = pkgs.nixpkgs-fmt;
Expand Down
3 changes: 2 additions & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{ pkgs, lib }:
{ pkgs, lib, pkgs-risc0-rustc }:

lib.makeScope pkgs.newScope (self: with self; {
r0vm = callPackage ./r0vm { };
rustc0 = pkgs-risc0-rustc.callPackage ./rustc0 { };
})
4 changes: 2 additions & 2 deletions templates/default/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

inputs = {
nixpkgs.follows = "risc0pkgs/nixpkgs";
risc0pkgs.url = "github:cspr-rad/risc0pkgs";
risc0pkgs.url = "github:cspr-rad/risc0pkgs/update-template";
};

outputs = { self, nixpkgs, risc0pkgs }:
let
systems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ];
systems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSystem = nixpkgs.lib.genAttrs systems;
in
{
Expand Down

0 comments on commit b136568

Please sign in to comment.