Packaging a standalone haskell script in nixpkgs

Hi,

I would like to package this Haskell script which isn’t on nixpkgs. That script is part of the hledger git repository which is part of nixpkgs.

What do you think I should do?

Thank you

Hi Damien,

while hledger is part of nixpkgs the hledger git repo is referenced nowhere, because we get hledger from the hackage tarball. I assume your script is not included there.

If your script is really only one file, I would recommend you to use a combination of fetchurl (on the direct raw github url) and pkgs.writers.writeHaskell(Bin). See:

If writeHaskell or writeHaskellBin doesnt work for you a pkgs.runCommandusing aghc.withPackages` would probably be the more flexible version.

Hope that helps.

1 Like

thank you very much for your suggestion. I created a nixpkgs PR out of it.