c3h-nixfiles/nix/sources-dir.nix

15 lines
360 B
Nix
Raw Permalink Normal View History

2021-08-21 16:47:21 +00:00
{ 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"
]
2022-06-16 11:11:41 +00:00
++ lib.mapAttrsToList (name: source: "cp -r --reflink=auto ${source.outPath} $out/${name}") sources
2021-08-21 16:47:21 +00:00
)
)