From d9690aac4496e17d42bc5ea726fd854e86a4b34f Mon Sep 17 00:00:00 2001 From: Brian Hicks Date: Mon, 12 Jun 2023 16:31:17 -0500 Subject: [PATCH] use flake compat stuff --- default.nix | 13 +++---------- shell.nix | 32 +++----------------------------- 2 files changed, 6 insertions(+), 39 deletions(-) diff --git a/default.nix b/default.nix index d1de206..b22e926 100644 --- a/default.nix +++ b/default.nix @@ -1,10 +1,3 @@ -{ sources ? import ./nix/sources.nix { }, pkgs ? import sources.nixpkgs { }, ... -}: -let - naersk = pkgs.callPackage sources.naersk { }; - gitignore = pkgs.callPackage sources.gitignore { }; -in naersk.buildPackage { - root = (gitignore.gitignoreSource ./.); - buildInputs = [ pkgs.libiconv ]; -} - +(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) { + src = builtins.fetchGit ./.; +}).defaultNix diff --git a/shell.nix b/shell.nix index 7e9672b..db84e3d 100644 --- a/shell.nix +++ b/shell.nix @@ -1,29 +1,3 @@ -{ ... }: -let - sources = import ./nix/sources.nix; - nixpkgs = import sources.nixpkgs { }; - niv = import sources.niv { }; - naersk = nixpkgs.callPackage sources.naersk { }; - - cargo-lichking = naersk.buildPackage sources.cargo-lichking; -in with nixpkgs; -stdenv.mkDerivation { - name = "elm-forbid-import"; - buildInputs = [ - niv.niv - git - - # Rust - cargo - cargo-lichking - rustPackages.clippy - rustPackages.rustfmt - rustc - - # Benchmarking + Optimization - hyperfine - - # Testing - jq - ]; -} +(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) { + src = builtins.fetchGit ./.; +}).shellNix