aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-11-15 09:00:55 -0300
committerEuAndreh <eu@euandre.org>2019-11-15 09:00:55 -0300
commit83653f2bb61f0aef93149c76d2cc3bd5ff86aca4 (patch)
tree445b0afdaaad554edf3fd0cd223a79a829335db1
parentTODOs.org (diff)
downloadeuandre.org-83653f2bb61f0aef93149c76d2cc3bd5ff86aca4.tar.gz
euandre.org-83653f2bb61f0aef93149c76d2cc3bd5ff86aca4.tar.xz
utils.nix: Use nixfmt from nixpkgs
Diffstat (limited to '')
-rw-r--r--utils.nix8
1 files changed, 2 insertions, 6 deletions
diff --git a/utils.nix b/utils.nix
index 7e3a6db..5bcbb10 100644
--- a/utils.nix
+++ b/utils.nix
@@ -1,8 +1,4 @@
-{ pkgs, src, baseName }:
-let
- nixfmt = import (builtins.fetchTarball
- "https://github.com/serokell/nixfmt/archive/master.tar.gz") { };
-in rec {
+{ pkgs, src, baseName }: rec {
baseTask = pkgs.stdenv.mkDerivation {
name = "${baseName}-task";
src = src;
@@ -26,7 +22,7 @@ in rec {
});
formatNix = baseTask.overrideAttrs (baseAttrs: {
name = "${baseAttrs.name}-nixfmt";
- buildInputs = baseAttrs.buildInputs ++ [ nixfmt ];
+ buildInputs = baseAttrs.buildInputs ++ [ pkgs.nixfmt ];
buildPhase = ''
format() {
nix_file="$1"