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
7 changes: 6 additions & 1 deletion cabal2nix/hackage2nix/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,13 @@ main = do
)
CLI {..} <- execParser pinfo

let nixpkgsArgs = mconcat [ "{"
, "overlays = [ (self: super: { haskellPackages = self.lib.dontRecurseIntoAttrs super.haskellPackages; }) ];"
, "config.allowAliases = false;"
, "}"
]
Comment on lines +81 to +85
Copy link
Contributor

Choose a reason for hiding this comment

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

Why don't we put this overlay's code in https://github.com/NixOS/cabal2nix/blob/master/distribution-nixpkgs/derivation-attr-paths.nix?

I think that fits better.

Copy link
Member Author

Choose a reason for hiding this comment

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

We could do that, but we can't really add this feature without changing the API for distribution-nixpkgs which I didn't want to commit to yet…

Copy link
Contributor

Choose a reason for hiding this comment

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

I have no idea what you mean. Why would that change the API? And if so, why would that be bad?

config <- sconcat <$> mapM (\file -> readConfiguration (nixpkgsRepository </> file)) configFiles
nixpkgs <- readNixpkgPackageMap nixpkgsRepository (Just "{ config = { allowAliases = false; }; }")
nixpkgs <- readNixpkgPackageMap nixpkgsRepository (Just nixpkgsArgs)
preferredVersions <- readPreferredVersions (fromMaybe (hackageRepository </> "preferred-versions") preferredVersionsFile)
let fixup = Map.delete "acme-everything" -- TODO: https://github.com/NixOS/cabal2nix/issues/164
. Map.delete "type" -- TODO: https://github.com/NixOS/cabal2nix/issues/163
Expand Down
6 changes: 3 additions & 3 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ pkgs ?
import (builtins.fetchTarball {
# nixos-unstable 2025-04-23
url = "https://github.com/nixos/nixpkgs/archive/96d30055a2215e5c5a545872376137a5d063e804.tar.gz";
sha256 = "0xvzkpgc8qy4q252c3x399c8ikrks970c877s4i7vppnhxp08p8n";
# nixos-unstable 2025-08-10
url = "https://github.com/nixos/nixpkgs/archive/c9b6fb798541223bbb396d287d16f43520250518.tar.gz";
sha256 = "sha256-vgPm2xjOmKdZ0xKA6yLXPJpjOtQPHfaZDRtH+47XEBo=";
}) { }
, ghcVersion ? pkgs.haskellPackages.ghc.version
# Pass --arg minimal true to disable tools that are not strictly necessary
Expand Down
Loading