Reputation: 11321
I just want to be able to use the latest version of pandoc
, the Haskell package, in my project which I'm building with Nix.
Here's my shell.nix file. The commented-out section is where I attempt to override the package version, but it doesn't seem to work.
with import <nixpkgs> {};
( let
colormath = pkgs.python3Packages.buildPythonPackage rec {
pname = "colormath";
version = "3.0.0";
src = pkgs.python3Packages.fetchPypi{
inherit version;
inherit pname;
sha256 = "05qjycgxp3p2f9n6lmic68sxmsyvgnnlyl4z9w7dl9s56jphaiix";
};
buildInputs = [ pkgs.python3Packages.numpy pkgs.python3Packages.networkx ];
};
spacy_conll = pkgs.python3Packages.buildPythonPackage rec {
pname = "spacy_conll";
version = "1.0.1";
src = pkgs.python3Packages.fetchPypi{
inherit version;
inherit pname;
sha256 = "1wffwp539i3yvqx6dl3ki5fmmbrpqpnf0ymg5806czk0rh7843j7";
};
buildInputs = [ pkgs.python3Packages.spacy pkgs.python3Packages.packaging ];
};
# pandoc = pkgs.haskellPackages.pandoc.override {
# version = "2.9.1.1";
# };
in pkgs.mkShell {
shellHook = "eval $(egrep ^export ${ghc}/bin/ghc)";
buildInputs = with pkgs; [
(python3.withPackages (ps: with ps; [
matplotlib
spacy
pandas
spacy_models.en_core_web_md
jupyter
scikitlearn
nltk
altair
vega_datasets
cherrypy
dominate
plotly
colormath
falcon # Spacy server from Haskell Cookbook
spacy_conll
]))
(haskellPackages.ghcWithPackages (ps: with ps; [ lens pandoc roman-numerals doclayout ] ))
];
}
)
Upvotes: 4
Views: 1646
Reputation: 146
Pandoc 2.9.1.1 is available in nixpkgs as haskellPackages.pandoc_2_9_1_1
. I'd advise you to use this instead of trying to override the package as there are some differences in dependencies. For reference though, here's how you would go about overriding haskellPackages
:
let
hsPkgs = pkgs.haskellPackages.override {
overrides = self: super: {
pandoc = pkgs.haskell.lib.overrideCabal super.pandoc {
version = "2.9.1.1";
sha256 = "0vc1ld57nv27gwq4mq0wdal8k2wxvsc0f3m2jwq9nkq7wbpwa8cx";
};
};
};
in pkgs.mkShell {
buildInputs = with pkgs; [
(hsPkgs.ghcWithPackages (ps: with ps; [ pandoc ] ))
];
}
Upvotes: 4