From 8d5714c67bc8d896ef149188cae7ef58214038d3 Mon Sep 17 00:00:00 2001 From: Aleix Roca Nonell Date: Tue, 31 Oct 2023 10:36:20 +0100 Subject: [PATCH] Move nixpkgs reference to its own expression Reviewed-By: Rodrigo Arias Mallo --- default.nix | 10 +--------- nixpkgs.nix | 9 +++++++++ 2 files changed, 10 insertions(+), 9 deletions(-) create mode 100644 nixpkgs.nix diff --git a/default.nix b/default.nix index f374124..a28f759 100644 --- a/default.nix +++ b/default.nix @@ -1,16 +1,8 @@ let bscOverlay = import ./overlay.nix; - commit = "d680ded26da5cf104dd2735a51e88d2d8f487b4d"; - # Pin the nixpkgs - nixpkgsPath = builtins.fetchTarball { - # Descriptive name to make the store path easier to identify - name = "nixpkgs-${commit}"; - url = "https://github.com/nixos/nixpkgs/archive/${commit}.tar.gz"; - # Hash obtained using `nix-prefetch-url --unpack ` - sha256 = "0xczslr40zy1wlg0ir8mwyyn5gz22i2f9dfd0vmgnk1664v4chky"; - }; + nixpkgsPath = import ./nixpkgs.nix; pkgs = import nixpkgsPath { overlays = [ bscOverlay ]; diff --git a/nixpkgs.nix b/nixpkgs.nix new file mode 100644 index 0000000..37e5ebd --- /dev/null +++ b/nixpkgs.nix @@ -0,0 +1,9 @@ +let + commit = "d680ded26da5cf104dd2735a51e88d2d8f487b4d"; +in builtins.fetchTarball { + # Descriptive name to make the store path easier to identify + name = "nixpkgs-${commit}"; + url = "https://github.com/nixos/nixpkgs/archive/${commit}.tar.gz"; + # Hash obtained using `nix-prefetch-url --unpack ` + sha256 = "0xczslr40zy1wlg0ir8mwyyn5gz22i2f9dfd0vmgnk1664v4chky"; +}