Commit 1700d005 authored by Silvan Mosberger's avatar Silvan Mosberger
Browse files

ci: Add default.nix with exposed pkgs

Allows reusing it in more places
parent b523c0d2
Loading
Loading
Loading
Loading

ci/default.nix

0 → 100644
+27 −0
Original line number Diff line number Diff line
let
  pinnedNixpkgs = builtins.fromJSON (builtins.readFile ./pinned-nixpkgs.json);
in
{
  system ? builtins.currentSystem,

  nixpkgs ? null,
}:
let
  nixpkgs' =
    if nixpkgs == null then
      fetchTarball {
        url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgs.rev}.tar.gz";
        sha256 = pinnedNixpkgs.sha256;
      }
    else
      nixpkgs;

  pkgs = import nixpkgs' {
    inherit system;
    config = { };
    overlays = [ ];
  };
in
{
  inherit pkgs;
}
+2 −13
Original line number Diff line number Diff line
@@ -11,23 +11,12 @@
#
#     nix-shell --arg nixpkgs ./.
#
let
  pinnedNixpkgs = builtins.fromJSON (builtins.readFile ci/pinned-nixpkgs.json);
in
{
  system ? builtins.currentSystem,

  nixpkgs ? fetchTarball {
    url = "https://github.com/NixOS/nixpkgs/archive/${pinnedNixpkgs.rev}.tar.gz";
    sha256 = pinnedNixpkgs.sha256;
  },
  nixpkgs ? null,
}:
let
  pkgs = import nixpkgs {
    inherit system;
    config = { };
    overlays = [ ];
  };
  inherit (import ./ci { inherit nixpkgs system; }) pkgs;
in
pkgs.mkShellNoCC {
  packages = with pkgs; [