From a04e6275a6bea232cd04fc6f3cbf20d4cb02a3e1 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Tue, 3 Oct 2023 00:08:49 -0400 Subject: [PATCH] switch to flakehub --- flake.lock | 34 ++++++++++++++-------------------- flake.nix | 7 ++----- shell.nix | 25 ++++++++++--------------- 3 files changed, 26 insertions(+), 40 deletions(-) diff --git a/flake.lock b/flake.lock index 0b6834a..c6ea082 100644 --- a/flake.lock +++ b/flake.lock @@ -1,35 +1,29 @@ { "nodes": { "flake-compat": { - "flake": false, "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" + "narHash": "sha256-AAQ/2sD+0D18bb8hKuEEVpHUYD1GmO2Uh/taFamn6XQ=", + "rev": "4f910c9827911b1ec2bf26b5a062cd09f8d89f85", + "revCount": 55, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/edolstra/flake-compat/1.0.0/018af168-abf6-7903-8e2c-be5db8d27950/source.tar.gz" }, "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz" } }, "nixpkgs": { "locked": { - "lastModified": 1684385584, - "narHash": "sha256-O7y0gK8OLIDqz+LaHJJyeu09IGiXlZIS3+JgEzGmmJA=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "48a0fb7aab511df92a17cf239c37f2bd2ec9ae3a", - "type": "github" + "narHash": "sha256-X3+DKYWJm93DRSdC5M6K5hLqzSya9BjibtBsuARoPco=", + "rev": "f5892ddac112a1e9b3612c39af1b72987ee5783a", + "revCount": 530560, + "type": "tarball", + "url": "https://api.flakehub.com/f/pinned/NixOS/nixpkgs/0.1.530560%2Brev-f5892ddac112a1e9b3612c39af1b72987ee5783a/018aec4d-58df-7d2d-a74e-b1bc82c4654f/source.tar.gz" }, "original": { - "owner": "NixOS", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" + "type": "tarball", + "url": "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz" } }, "root": { diff --git a/flake.nix b/flake.nix index 1f7deae..5d58dd9 100644 --- a/flake.nix +++ b/flake.nix @@ -2,12 +2,9 @@ description = "Magic Nix Cache"; inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/0.1.0.tar.gz"; - flake-compat = { - url = "github:edolstra/flake-compat"; - flake = false; - }; + flake-compat.url = "https://flakehub.com/f/edolstra/flake-compat/1.tar.gz"; }; outputs = { self, nixpkgs, ... }: diff --git a/shell.nix b/shell.nix index 3d1a026..64fbdb4 100644 --- a/shell.nix +++ b/shell.nix @@ -1,15 +1,10 @@ -let - lock = builtins.fromJSON (builtins.readFile ./flake.lock); - - flake-compat = builtins.fetchTarball { - url = "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; - sha256 = lock.nodes.flake-compat.locked.narHash; - }; - - flake = import flake-compat { - src = ./.; - }; - - shell = flake.shellNix.default; -in -shell +(import + ( + let lock = builtins.fromJSON (builtins.readFile ./flake.lock); in + fetchTarball { + url = lock.nodes.flake-compat.locked.url or "https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; + sha256 = lock.nodes.flake-compat.locked.narHash; + } + ) + { src = ./.; } +).shellNix \ No newline at end of file