c3h-nixfiles/nix/sources-dir.nix
2021-08-21 18:57:02 +02:00

14 lines
345 B
Nix

{ system ? builtins.currentSystem }:
let
sources = import ./sources.nix {};
pkgs = import sources.nixpkgs { inherit system; };
lib = pkgs.lib;
in
pkgs.runCommand "sources" {} (
lib.concatStringsSep "\n" ([
"mkdir $out"
]
++ lib.mapAttrsToList (name: source: "ln -s ${source.outPath} $out/${name}") sources
)
)