Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,6 @@ let
haskell = super.haskell // {
packageOverrides = self: super: { nixfmt = self.callCabal2nix "nixfmt" haskellSource { }; };
};

treefmt = super.treefmt.overrideAttrs (old: {
patches = [
# Makes it work in parallel: https://github.com/numtide/treefmt/pull/282
(self.fetchpatch {
url = "https://github.com/numtide/treefmt/commit/f596795cd24b50f048cc395866bb90a89d99152d.patch";
hash = "sha256-EPn+JAT3aZLSWmpdi9ULZ8o8RvrX+UFp0cQWfBcQgVg=";
})
];
});
};

pkgs = import nixpkgs {
Expand Down
6 changes: 3 additions & 3 deletions npins/sources.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"pins": {
"nixpkgs": {
"type": "Channel",
"name": "nixpkgs-unstable",
"url": "https://releases.nixos.org/nixpkgs/nixpkgs-24.05pre596549.db001797591b/nixexprs.tar.xz",
"hash": "0260ylnd8kawcd3i9xkm8j295hf3bs377vjff8pm3v914jzld9v9"
"name": "nixos-25.11",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"name": "nixos-25.11",
"name": "nixpkgs-unstable",

"url": "https://releases.nixos.org/nixos/25.11/nixos-25.11.8919.d96b37bbeb98/nixexprs.tar.xz",
"hash": "0ixgv3ma5nswayzdv83zlcbsyki091smr0gl37gf8gwngimbbvr5"
},
"serokell-nix": {
"type": "Git",
Expand Down
8 changes: 4 additions & 4 deletions test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ verifyCorrect() {
shift

echo "Checking $file (${*:-no options}) …"
if ! out=$(nixfmt --strict --verify "$@" < "$file"); then
if ! out=$(nixfmt --strict --verify "$@" - < "$file"); then
echo "[ERROR] failed nixfmt verification"
exit 1
fi
Expand All @@ -60,7 +60,7 @@ verifyCorrect test/correct-indent-4.nix --indent=4

# Verify "invalid"
for file in test/invalid/*.nix; do
if nixfmt < "$file" > /dev/null 2>&1; then
if nixfmt - < "$file" > /dev/null 2>&1; then
echo "[ERROR] $file should have failed nixfmt"
exit 1
else
Expand All @@ -71,7 +71,7 @@ done
# Verify "diff"
for file in test/diff/**/in.nix; do
echo "Checking $file …"
out="$(nixfmt --verify < "$file")"
out="$(nixfmt --verify - < "$file")"
outfile="$(dirname "$file")/out.nix"

if diff --color=always --unified "$outfile" <(echo "$out"); then
Expand All @@ -85,7 +85,7 @@ for file in test/diff/**/in.nix; do
fi

echo "Checking $file with --strict …"
out="$(nixfmt --strict --verify < "$file")"
out="$(nixfmt --strict --verify - < "$file")"
outfile="$(dirname "$file")/out-pure.nix"

if diff --color=always --unified "$outfile" <(echo "$out"); then
Expand Down
Loading