aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-05-30 23:13:03 -0300
committerEuAndreh <eu@euandre.org>2019-05-30 23:13:03 -0300
commit2af311e26a4727866242ce897927f93f56a805fb (patch)
tree3402ab2cb4b58a7e12fc6f8b5ae8ecc785ac9458
parentPolish and use utils.fixme derivation (diff)
downloaddotfiles-2af311e26a4727866242ce897927f93f56a805fb.tar.gz
dotfiles-2af311e26a4727866242ce897927f93f56a805fb.tar.xz
Restore subtasks.uniqueFeed derivation
-rw-r--r--default.nix16
-rw-r--r--nixos/utils.nix46
2 files changed, 15 insertions, 47 deletions
diff --git a/default.nix b/default.nix
index 8cd6397..b138123 100644
--- a/default.nix
+++ b/default.nix
@@ -2,6 +2,20 @@ let
pkgs = import <nixpkgs> { };
rootSrc = pkgs.nix-gitignore.gitignoreSource [ ] ./.;
in rec {
+ subtasks = rec {
+ uniqueFeeds = utils.baseTask.overrideAttrs (baseAttrs: {
+ name = "${baseAttrs.name}-unique-feeds";
+ buildPhase = ''
+ OUT="$(uniq -D <(sort ./newsboat/urls))"
+ [[ $OUT = "" ]] || {
+ echo "Duplicate subscriptions found in ./newsboat/urls:"
+ echo "$OUT"
+ exit 1
+ }
+ touch $out
+ '';
+ });
+ };
utils = import ./nixos/utils.nix {
pkgs = pkgs;
rootSrc = rootSrc; # FIXME: remove the need for this
@@ -11,6 +25,6 @@ in rec {
utils.formatNix
(utils.shellcheck ".*(encrypted|os-installation.sh).*")
(utils.fixme [ "default.nix" "utils.nix" ])
- # subtasks.uniqueFeeds
+ subtasks.uniqueFeeds
];
}
diff --git a/nixos/utils.nix b/nixos/utils.nix
index 4a1b8fd..06a7e55 100644
--- a/nixos/utils.nix
+++ b/nixos/utils.nix
@@ -72,49 +72,3 @@ in rec {
'';
});
}
-
-# subtasks = rec {
-# shellcheck = baseTask.overrideAttrs(baseAttrs: {
-# name = "${baseAttrs.name}-shellcheck";
-# buildInputs = baseAttrs.buildInputs ++ [ pkgs.shellcheck ];
-# buildPhase = ''
-# export SHELLCHECK_OPTS="-e SC1090 -e SC1091 -e SC2139"
-# ignored='(encrypted|os-installation.sh|notmuch-post.sh)'
-# find . -type f -name '*.sh' | grep -E -v $ignored | xargs shellcheck
-# touch $out
-# '';
-# });
-# fixme = baseTask.overrideAttrs(baseAttrs: {
-# name = "${baseAttrs.name}-fixme";
-# buildInputs = baseAttrs.buildInputs ++ [ ag ];
-# buildPhase = ''
-# ag FIXME --ignore default.nix || {
-# touch $out
-# }
-# '';
-# });
-# uniqueFeeds = baseTask.overrideAttrs (baseAttrs: {
-# name = "${baseAttrs.name}-unique-feeds";
-# buildPhase = ''
-# OUT="$(uniq -D <(sort ./newsboat/urls))"
-# [[ $OUT = "" ]] || {
-# echo "Duplicate subscriptions found in ./newsboat/urls:"
-# echo "$OUT"
-# exit 1
-# }
-# touch $out
-# '';
-# });
-# formatNix = baseTask.overrideAttrs (baseAttrs: {
-# name = "${baseAttrs.name}-nixfmt";
-# buildInputs = baseAttrs.buildInputs ++ [nixfmt];
-# buildPhase = ''
-# diff <(nixfmt < default.nix) default.nix || {
-# echo "The default.nix is unformatted. To fix it, run:"
-# echo " nixfmt default.nix"
-# exit 1
-# }
-# touch $out
-# '';
-# });
-# };