I’m trying to revert my NixOS configuration back to the non-flakes version. Unfortunately, I’m having a problem trying to include some Haskell programs I wote.
My NixOS configuration includes the following:
nixpkgs.overlays = [
(import ./overlays/default.nix)
];
. . .
environment.systemPackages = [
# My custom packages
jot
pandoc-select-code
# Standard packages
. . .
When I rebuild my configuration, I get the following error:
$ sudo nixos-rebuild switch --upgrade
[sudo] password for amy:
unpacking channels...
building Nix...
building the system configuration...
error: attribute 'jot' missing
at /nix/var/nix/profiles/per-user/root/channels/nixos/lib/modules.nix:389:28:
388| builtins.addErrorContext (context name)
389| (args.${name} or config._module.args.${name})
| ^
390| ) (lib.functionArgs f);
(use '--show-trace' to show detailed location information)
Here’s ./overlays/default.nix
:
final: prev: {
jot = final.haskellPackages.callPackage ./jot {};
pandoc-select-code = final.haskellPackages.callPackage ./pandoc-select-code {};
}
I know that ./overlays/default.nix
is getting read, because if I add some garbage text to it, I get a syntax error.
Here’s ./overlays/jot/default.nix
. I know this is not getting read, because the error message I get is not a syntax error.
THIS TEXT WILL CAUSE A SYNTAX ERROR, WHICH LETS ME KNOW THIS FILE IS BEING READ
{ mkDerivation, base, cmdargs, directory, fetchgit, filepath
, process, lib, time
}:
mkDerivation {
pname = "jot";
version = "1.4";
src = fetchgit {
url = "https://github.com/mhwombat/jot.git";
sha256 = "1slnsh2jmqbhrsll6xlwa7nks35agmx2hrwxiy26shvnnfcv6m0d";
rev = "006ac6d2d97e2cfdf42baa0e6d18dd9eb06c0c05";
fetchSubmodules = true;
};
isLibrary = false;
isExecutable = true;
executableHaskellDepends = [
base cmdargs directory filepath process time
];
license = lib.licenses.publicDomain;
}
I even tried putting an absolute path to jot in ./overlays/default.nix
, but it made no difference.
My entire configuration is available at GitHub - mhwombat/nixos-config: My NixOS configuration.