From 674b4548fa7efd573aba2efba2abc98dcdb02854 Mon Sep 17 00:00:00 2001 From: Gary Guo Date: Wed, 25 Sep 2024 17:25:40 +0100 Subject: [PATCH] Nix cleanups --- flake.nix | 6 +----- pkgs/default.nix | 5 +---- pkgs/lowrisc-toolchain-gcc-rv32imcb.nix | 4 ++++ pkgs/lowrisc-toolchain-gcc-rv64imac.nix | 4 ++++ pkgs/sv-lang.nix | 1 + 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index f090560..4709484 100644 --- a/flake.nix +++ b/flake.nix @@ -86,9 +86,5 @@ formatter = pkgs.alejandra; }); in - # Recursive-merge attrsets to compose the final flake outputs attrset. - builtins.foldl' nixpkgs.lib.attrsets.recursiveUpdate {} [ - no_system_outputs - all_system_outputs - ]; + no_system_outputs // all_system_outputs; } diff --git a/pkgs/default.nix b/pkgs/default.nix index b6549b1..54f6439 100644 --- a/pkgs/default.nix +++ b/pkgs/default.nix @@ -5,8 +5,7 @@ pkgs, inputs, ... -}: -rec { +}: rec { ncurses5-fhs = pkgs.callPackage ./ncurses5-fhs.nix {}; fpga-udev-rules = pkgs.callPackage ./fpga-udev-rules {}; @@ -30,8 +29,6 @@ rec { veridian = pkgs.callPackage ./veridian/default.nix {inherit sv-lang_6;}; riscv64-gcc = pkgs.pkgsCross.riscv64.buildPackages.gcc; -} -// pkgs.lib.optionalAttrs (pkgs.system == "x86_64-linux") { lowrisc-toolchain-gcc-rv32imcb = pkgs.callPackage ./lowrisc-toolchain-gcc-rv32imcb.nix {}; lowrisc-toolchain-gcc-rv64imac = pkgs.callPackage ./lowrisc-toolchain-gcc-rv64imac.nix {}; } diff --git a/pkgs/lowrisc-toolchain-gcc-rv32imcb.nix b/pkgs/lowrisc-toolchain-gcc-rv32imcb.nix index 26c5de5..f21b733 100644 --- a/pkgs/lowrisc-toolchain-gcc-rv32imcb.nix +++ b/pkgs/lowrisc-toolchain-gcc-rv32imcb.nix @@ -31,4 +31,8 @@ stdenv.mkDerivation rec { patchelf --set-rpath ${lib.makeLibraryPath ["$out" stdenv.cc.cc ncurses5]} "$f" || true done ''; + + meta = { + platforms = ["x86_64-linux"]; + }; } diff --git a/pkgs/lowrisc-toolchain-gcc-rv64imac.nix b/pkgs/lowrisc-toolchain-gcc-rv64imac.nix index 483d918..5eeb781 100644 --- a/pkgs/lowrisc-toolchain-gcc-rv64imac.nix +++ b/pkgs/lowrisc-toolchain-gcc-rv64imac.nix @@ -31,4 +31,8 @@ stdenv.mkDerivation rec { patchelf --set-rpath ${lib.makeLibraryPath ["$out" stdenv.cc.cc ncurses5]} "$f" || true done ''; + + meta = { + platforms = ["x86_64-linux"]; + }; } diff --git a/pkgs/sv-lang.nix b/pkgs/sv-lang.nix index 3d2785b..0299e9d 100644 --- a/pkgs/sv-lang.nix +++ b/pkgs/sv-lang.nix @@ -73,6 +73,7 @@ in license = licenses.mit; maintainers = with maintainers; [sharzy]; mainProgram = "slang"; + broken = stdenv.system == "x86_64-darwin"; platforms = platforms.all; }; }