nixpkgs/pkgs/development/haskell-modules/cabal2nix-unstable.nix
Silvan Mosberger 4f0dadbf38 treewide: format all inactive Nix files
After final improvements to the official formatter implementation,
this commit now performs the first treewide reformat of Nix files using it.
This is part of the implementation of RFC 166.

Only "inactive" files are reformatted, meaning only files that
aren't being touched by any PR with activity in the past 2 months.
This is to avoid conflicts for PRs that might soon be merged.
Later we can do a full treewide reformat to get the rest,
which should not cause as many conflicts.

A CI check has already been running for some time to ensure that new and
already-formatted files are formatted, so the files being reformatted here
should also stay formatted.

This commit was automatically created and can be verified using

    nix-build a08b3a4d19.tar.gz \
      --argstr baseRev b32a094368
    result/bin/apply-formatting $NIXPKGS_PATH
2024-12-10 20:26:33 +01:00

109 lines
1.9 KiB
Nix

# This file defines cabal2nix-unstable, used by maintainers/scripts/haskell/regenerate-hackage-packages.sh.
{
mkDerivation,
aeson,
ansi-wl-pprint,
base,
bytestring,
Cabal,
containers,
deepseq,
directory,
distribution-nixpkgs,
fetchzip,
filepath,
hackage-db,
hopenssl,
hpack,
language-nix,
lens,
lib,
monad-par,
monad-par-extras,
mtl,
optparse-applicative,
pretty,
process,
split,
tasty,
tasty-golden,
text,
time,
transformers,
yaml,
}:
mkDerivation {
pname = "cabal2nix";
version = "unstable-2024-12-04";
src = fetchzip {
url = "https://github.com/NixOS/cabal2nix/archive/af1bc25377f7a44e008def494bda77a83578d9be.tar.gz";
sha256 = "0jjsy77vm88x81a5pwq5nhgnbiywjza8qyjsr2kclsdh860m3hmp";
};
postUnpack = "sourceRoot+=/cabal2nix; echo source root reset to $sourceRoot";
isLibrary = true;
isExecutable = true;
libraryHaskellDepends = [
aeson
ansi-wl-pprint
base
bytestring
Cabal
containers
deepseq
directory
distribution-nixpkgs
filepath
hackage-db
hopenssl
hpack
language-nix
lens
optparse-applicative
pretty
process
split
text
time
transformers
yaml
];
executableHaskellDepends = [
aeson
base
bytestring
Cabal
containers
directory
distribution-nixpkgs
filepath
hopenssl
language-nix
lens
monad-par
monad-par-extras
mtl
optparse-applicative
pretty
];
testHaskellDepends = [
base
Cabal
containers
directory
filepath
language-nix
lens
pretty
process
tasty
tasty-golden
];
preCheck = ''
export PATH="$PWD/dist/build/cabal2nix:$PATH"
export HOME="$TMPDIR/home"
'';
homepage = "https://github.com/nixos/cabal2nix#readme";
description = "Convert Cabal files into Nix build instructions";
license = lib.licenses.bsd3;
}