···230230231231Every haskell package set has its own haskell-aware `mkDerivation` which is used
232232to build its packages. Generally you won't have to interact with this builder
233233-since [cabal2nix][cabal2nix] can generate packages
233233+since [cabal2nix](#haskell-cabal2nix) can generate packages
234234using it for an arbitrary cabal package definition. Still it is useful to know
235235the parameters it takes when you need to
236236[override](#haskell-overriding-haskell-packages) a generated Nix expression.
···11231123Note that this feature is automatically disabled when cross-compiling, since it
11241124requires executing the binaries in question.
1125112511261126+## Import-from-Derivation helpers {#haskell-import-from-derivation}
11271127+11281128+### cabal2nix {#haskell-cabal2nix}
11291129+11301130+[`cabal2nix`][cabal2nix] can generate Nix package definitions for arbitrary
11311131+Haskell packages using [import from derivation][import-from-derivation].
11321132+`cabal2nix` will generate Nix expressions that look like this:
11331133+11341134+```nix
11351135+# cabal get mtl-2.2.1 && cd mtl-2.2.1 && cabal2nix .
11361136+{ mkDerivation, base, lib, transformers }:
11371137+mkDerivation {
11381138+ pname = "mtl";
11391139+ version = "2.2.1";
11401140+ src = ./.;
11411141+ libraryHaskellDepends = [ base transformers ];
11421142+ homepage = "http://github.com/ekmett/mtl";
11431143+ description = "Monad classes, using functional dependencies";
11441144+ license = lib.licenses.bsd3;
11451145+}
11461146+```
11471147+11481148+This expression should be called with `haskellPackages.callPackage`, which will
11491149+supply [`haskellPackages.mkDerivation`](#haskell-mkderivation) and the Haskell
11501150+dependencies as arguments.
11511151+11521152+`callCabal2nix name src args`
11531153+: Create a package named `name` from the source derivation `src` using
11541154+ `cabal2nix`.
11551155+11561156+ `args` are extra arguments provided to `haskellPackages.callPackage`.
11571157+11581158+`callCabal2nixWithOptions name src opts args`
11591159+: Create a package named `name` from the source derivation `src` using
11601160+ `cabal2nix`.
11611161+11621162+ `opts` are extra options for calling `cabal2nix`. If `opts` is a string, it
11631163+ will be used as extra command line arguments for `cabal2nix`, e.g. `--subpath
11641164+ path/to/dir/containing/cabal-file`. Otherwise, `opts` should be an AttrSet
11651165+ which can contain the following attributes:
11661166+11671167+ `extraCabal2nixOptions`
11681168+ : Extra command line arguments for `cabal2nix`.
11691169+11701170+ `srcModifier`
11711171+ : A function which is used to modify the given `src` instead of the default
11721172+ filter.
11731173+11741174+ The default source filter will remove all files from `src` except for
11751175+ `.cabal` files and `package.yaml` files.
11761176+11261177<!--
1127117811281128-TODO(@NixOS/haskell): finish these planned sections
11291129-### Overriding the entire package set
11791179+`callHackage`
11801180+: TODO
11811181+11821182+`callHackageDirect`
11831183+: TODO
1130118411851185+`developPackage`
11861186+: TODO
1131118711321132-## Import-from-Derivation helpers
11881188+-->
1133118911341134-* `callCabal2nix`
11351135-* `callHackage`, `callHackageDirect`
11361136-* `developPackage`
11901190+<!--
11911191+11921192+TODO(@NixOS/haskell): finish these planned sections
11931193+### Overriding the entire package set
1137119411381195## Contributing {#haskell-contributing}
11391196···13091366[profiling]: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/profiling.html
13101367[search.nixos.org]: https://search.nixos.org
13111368[turtle]: https://hackage.haskell.org/package/turtle
13691369+[import-from-derivation]: https://nixos.org/manual/nix/stable/language/import-from-derivation
···187187188188- [xdg-terminal-exec](https://github.com/Vladimir-csp/xdg-terminal-exec), the proposed Default Terminal Execution Specification.
189189190190+- [your_spotify](https://github.com/Yooooomi/your_spotify), a self hosted Spotify tracking dashboard. Available as [services.your_spotify](#opt-services.your_spotify.enable)
191191+190192- [RustDesk](https://rustdesk.com), a full-featured open source remote control alternative for self-hosting and security with minimal configuration. Alternative to TeamViewer. Available as [services.rustdesk-server](#opt-services.rustdesk-server.enable).
191193192194- [Scrutiny](https://github.com/AnalogJ/scrutiny), a S.M.A.R.T monitoring tool for hard disks with a web frontend. Available as [services.scrutiny](#opt-services.scrutiny.enable).
···6767 headless one, so it is also possible to run wayvnc without a physical
6868 display attached.
6969 '';
7070+ mainProgram = "wayvnc";
7071 inherit (src.meta) homepage;
7172 changelog = "https://github.com/any1/wayvnc/releases/tag/v${version}";
7273 license = licenses.isc;
···26262727 # GHCJS does not ship with the same core packages as GHC.
2828 # https://github.com/ghcjs/ghcjs/issues/676
2929- stm = doJailbreak self.stm_2_5_3_0;
2929+ stm = doJailbreak self.stm_2_5_3_1;
3030 exceptions = dontCheck self.exceptions_0_10_7;
31313232## OTHER PACKAGES
···3838 - acme-memorandom # failure in job https://hydra.nixos.org/build/233222926 at 2023-09-02
3939 - acme-miscorder # failure in job https://hydra.nixos.org/build/233209957 at 2023-09-02
4040 - acme-mutable-package # failure in job https://hydra.nixos.org/build/233213349 at 2023-09-02
4141+ - acme-not-a-joke # failure in job https://hydra.nixos.org/build/259604911 at 2024-05-15
4142 - acme-now # failure in job https://hydra.nixos.org/build/233243289 at 2023-09-02
4243 - acme-numbersystem # failure in job https://hydra.nixos.org/build/233208106 at 2023-09-02
4344 - acme-operators # failure in job https://hydra.nixos.org/build/233248282 at 2023-09-02
···8384 - aeson-flat # failure in job https://hydra.nixos.org/build/233220787 at 2023-09-02
8485 - aeson-flatten # failure in job https://hydra.nixos.org/build/233242954 at 2023-09-02
8586 - aeson-flowtyped # failure in job https://hydra.nixos.org/build/233245878 at 2023-09-02
8686- - aeson-gadt-th # failure in job https://hydra.nixos.org/build/233247060 at 2023-09-02
8787 - aeson-generics-typescript # failure in job https://hydra.nixos.org/build/245703304 at 2024-01-07
8888 - aeson-injector # failure in job https://hydra.nixos.org/build/233200351 at 2023-09-02
8989 - aeson-json-ast # failure in job https://hydra.nixos.org/build/233249406 at 2023-09-02
···369369 - bash # failure in job https://hydra.nixos.org/build/252719390 at 2024-03-16
370370 - basic-gps # failure in job https://hydra.nixos.org/build/252718385 at 2024-03-16
371371 - basics # failure in job https://hydra.nixos.org/build/236678238 at 2023-10-04
372372- - basic-sop # failure in job https://hydra.nixos.org/build/233253357 at 2023-09-02
373372 - baskell # failure in job https://hydra.nixos.org/build/233246705 at 2023-09-02
374373 - battlenet # failure in job https://hydra.nixos.org/build/233260076 at 2023-09-02
375374 - battleplace # failure in job https://hydra.nixos.org/build/233230199 at 2023-09-02
···381380 - bdo # failure in job https://hydra.nixos.org/build/233216486 at 2023-09-02
382381 - beamable # failure in job https://hydra.nixos.org/build/233211619 at 2023-09-02
383382 - beam # failure in job https://hydra.nixos.org/build/233213313 at 2023-09-02
384384- - beam-migrate # failure in job https://hydra.nixos.org/build/252730758 at 2024-03-16
385383 - beam-mysql # failure in job https://hydra.nixos.org/build/233253237 at 2023-09-02
386384 - beam-newtype-field # failure in job https://hydra.nixos.org/build/233206317 at 2023-09-02
387385 - bech32 # failure in job https://hydra.nixos.org/build/233194823 at 2023-09-02
···707705 - cayene-lpp # failure in job https://hydra.nixos.org/build/233228959 at 2023-09-02
708706 - cayley-client # failure in job https://hydra.nixos.org/build/233260112 at 2023-09-02
709707 - cblrepo # failure in job https://hydra.nixos.org/build/233251926 at 2023-09-02
710710- - cbor-tool # failure in job https://hydra.nixos.org/build/233198797 at 2023-09-02
711708 - CCA # failure in job https://hydra.nixos.org/build/233206723 at 2023-09-02
712709 - ccast # failure in job https://hydra.nixos.org/build/233254517 at 2023-09-02
713710 - CC-delcont-cxe # failure in job https://hydra.nixos.org/build/233190865 at 2023-09-02
···740737 - changelog-d # failure in job https://hydra.nixos.org/build/253689337 at 2024-03-31
741738 - changelog-d # failure in job https://hydra.nixos.org/build/255671571 at 2024-04-16
742739 - changelog-d # failure in job https://hydra.nixos.org/build/257082502 at 2024-04-27
740740+ - changelog-d # failure in job https://hydra.nixos.org/build/259607598 at 2024-05-15
743741 - changelogged # failure in job https://hydra.nixos.org/build/233211675 at 2023-09-02
744742 - character-cases # failure in job https://hydra.nixos.org/build/233197636 at 2023-09-02
745743 - charter # failure in job https://hydra.nixos.org/build/233237264 at 2023-09-02
···805803 - clevercss # failure in job https://hydra.nixos.org/build/233206298 at 2023-09-02
806804 - clexer # failure in job https://hydra.nixos.org/build/233229804 at 2023-09-02
807805 - cli-builder # failure in job https://hydra.nixos.org/build/233209961 at 2023-09-02
808808- - cli-extras # failure in job https://hydra.nixos.org/build/233226908 at 2023-09-02
809806 - CLI # failure in job https://hydra.nixos.org/build/233191087 at 2023-09-02
810807 - clif # failure in job https://hydra.nixos.org/build/233197110 at 2023-09-02
811808 - clifm # failure in job https://hydra.nixos.org/build/233227426 at 2023-09-02
···10061003 - core-haskell # failure in job https://hydra.nixos.org/build/233222588 at 2023-09-02
10071004 - corenlp-types # failure in job https://hydra.nixos.org/build/243808366 at 2024-01-01
10081005 - core-warn # failure in job https://hydra.nixos.org/build/233204404 at 2023-09-02
10061006+ - cornelis # failure in job https://hydra.nixos.org/build/259604220 at 2024-05-15
10091007 - Coroutine # failure in job https://hydra.nixos.org/build/233211213 at 2023-09-02
10101008 - coroutine-object # failure in job https://hydra.nixos.org/build/233220413 at 2023-09-02
10111009 - couchdb-conduit # failure in job https://hydra.nixos.org/build/233227244 at 2023-09-02
···12331231 - dense-int-set # failure in job https://hydra.nixos.org/build/233214797 at 2023-09-02
12341232 - dependency # failure in job https://hydra.nixos.org/build/252727325 at 2024-03-16
12351233 - dependent-hashmap # failure in job https://hydra.nixos.org/build/233202881 at 2023-09-02
12361236- - dependent-monoidal-map # failure in job https://hydra.nixos.org/build/233212829 at 2023-09-02
12371234 - dep-t # failure in job https://hydra.nixos.org/build/233217847 at 2023-09-02
12381235 - deptrack-core # failure in job https://hydra.nixos.org/build/233239143 at 2023-09-02
12391236 - derangement # failure in job https://hydra.nixos.org/build/233209660 at 2023-09-02
···13051302 - dijkstra-simple # failure in job https://hydra.nixos.org/build/233218373 at 2023-09-02
13061303 - DimensionalHash # failure in job https://hydra.nixos.org/build/233230945 at 2023-09-02
13071304 - dino # failure in job https://hydra.nixos.org/build/252725815 at 2024-03-16
13051305+ - diohsc # failure in job https://hydra.nixos.org/build/259625302 at 2024-05-15
13081306 - diophantine # failure in job https://hydra.nixos.org/build/233229215 at 2023-09-02
13091307 - diplomacy # failure in job https://hydra.nixos.org/build/233207895 at 2023-09-02
13101308 - direct-binary-files # failure in job https://hydra.nixos.org/build/233246387 at 2023-09-02
···15481546 - erlang # failure in job https://hydra.nixos.org/build/233195837 at 2023-09-02
15491547 - erlang-ffi # failure in job https://hydra.nixos.org/build/233233314 at 2023-09-02
15501548 - eros # failure in job https://hydra.nixos.org/build/233247983 at 2023-09-02
15491549+ - errata # failure in job https://hydra.nixos.org/build/259627186 at 2024-05-15
15511550 - errno # failure in job https://hydra.nixos.org/build/252725782 at 2024-03-16
15521551 - error-context # failure in job https://hydra.nixos.org/build/233245027 at 2023-09-02
15531552 - error-continuations # failure in job https://hydra.nixos.org/build/233232357 at 2023-09-02
···19001899 - gang-of-threads # failure in job https://hydra.nixos.org/build/252716251 at 2024-03-16
19011900 - Ganymede # failure in job https://hydra.nixos.org/build/233248892 at 2023-09-02
19021901 - garepinoh # failure in job https://hydra.nixos.org/build/233238111 at 2023-09-02
19031903- - gargoyle # failure in job https://hydra.nixos.org/build/233196445 at 2023-09-02
19041902 - gas # failure in job https://hydra.nixos.org/build/233233966 at 2023-09-02
19051903 - gasp # failure in job https://hydra.nixos.org/build/252731457 at 2024-03-16
19061904 - gather # failure in job https://hydra.nixos.org/build/233208848 at 2023-09-02
···24102408 - hat # failure in job https://hydra.nixos.org/build/233243655 at 2023-09-02
24112409 - hats # failure in job https://hydra.nixos.org/build/233256724 at 2023-09-02
24122410 - hatt # failure in job https://hydra.nixos.org/build/233195039 at 2023-09-02
24132413- - haveibeenpwned # failure in job https://hydra.nixos.org/build/233253058 at 2023-09-02
24142411 - haven # failure in job https://hydra.nixos.org/build/233216806 at 2023-09-02
24152412 - haverer # failure in job https://hydra.nixos.org/build/233210491 at 2023-09-02
24162413 - hax # failure in job https://hydra.nixos.org/build/233212147 at 2023-09-02
···32083205 - jort # failure in job https://hydra.nixos.org/build/233195250 at 2023-09-02
32093206 - joy-rewrite # failure in job https://hydra.nixos.org/build/233201002 at 2023-09-02
32103207 - jpeg # failure in job https://hydra.nixos.org/build/233204056 at 2023-09-02
32113211- - jsaddle-clib # failure in job https://hydra.nixos.org/build/233203899 at 2023-09-02
32123212- - jsaddle-wkwebview # failure in job https://hydra.nixos.org/build/233242986 at 2023-09-02
32133208 - js-good-parts # failure in job https://hydra.nixos.org/build/233198958 at 2023-09-02
32143209 - json2 # failure in job https://hydra.nixos.org/build/233242447 at 2023-09-02
32153210 - json-alt # failure in job https://hydra.nixos.org/build/233242230 at 2023-09-02
···33923387 - language-webidl # failure in job https://hydra.nixos.org/build/233194656 at 2023-09-02
33933388 - laop # failure in job https://hydra.nixos.org/build/233204106 at 2023-09-02
33943389 - LargeCardinalHierarchy # failure in job https://hydra.nixos.org/build/233250339 at 2023-09-02
33953395- - large-generics # failure in job https://hydra.nixos.org/build/233210324 at 2023-09-02
33903390+ - large-records
33963391 - Lastik # failure in job https://hydra.nixos.org/build/233194460 at 2023-09-02
33973392 - latest-npm-version # failure in job https://hydra.nixos.org/build/233239108 at 2023-09-02
33983393 - latex-formulae-image # failure in job https://hydra.nixos.org/build/233251243 at 2023-09-02
···34353430 - lens-process # failure in job https://hydra.nixos.org/build/233242948 at 2023-09-02
34363431 - lensref # failure in job https://hydra.nixos.org/build/233205479 at 2023-09-02
34373432 - lens-simple # failure in job https://hydra.nixos.org/build/233245452 at 2023-09-02
34383438- - lens-sop # failure in job https://hydra.nixos.org/build/252721754 at 2024-03-16
34393433 - lens-tell # failure in job https://hydra.nixos.org/build/233234619 at 2023-09-02
34403434 - lens-text-encoding # failure in job https://hydra.nixos.org/build/233222713 at 2023-09-02
34413435 - lens-th-rewrite # failure in job https://hydra.nixos.org/build/233201025 at 2023-09-02
···41984192 - op2 # failure in job https://hydra.nixos.org/build/255683846 at 2024-04-16
41994193 - opaleye-classy # failure in job https://hydra.nixos.org/build/233214120 at 2023-09-02
42004194 - opaleye-sqlite # failure in job https://hydra.nixos.org/build/233191474 at 2023-09-02
41954195+ - opaleye-textsearch # failure in job https://hydra.nixos.org/build/259602432 at 2024-05-15
42014196 - opaleye-trans # failure in job https://hydra.nixos.org/build/233210536 at 2023-09-02
42024197 - open-adt # failure in job https://hydra.nixos.org/build/233201191 at 2023-09-02
42034198 - OpenAFP # failure in job https://hydra.nixos.org/build/233249295 at 2023-09-02
···47374732 - process-sequential # failure in job https://hydra.nixos.org/build/233221064 at 2023-09-02
47384733 - procrastinating-variable # failure in job https://hydra.nixos.org/build/233229350 at 2023-09-02
47394734 - procstat # failure in job https://hydra.nixos.org/build/233256320 at 2023-09-02
47354735+ - prodapi # failure in job https://hydra.nixos.org/build/259624456 at 2024-05-15
47404736 - product-isomorphic # failure in job https://hydra.nixos.org/build/233230736 at 2023-09-02
47414737 - prof2pretty # failure in job https://hydra.nixos.org/build/233240665 at 2023-09-02
47424738 - prof-flamegraph # failure in job https://hydra.nixos.org/build/233254675 at 2023-09-02
···47664762 - pro-source # failure in job https://hydra.nixos.org/build/233226793 at 2023-09-02
47674763 - prosper # failure in job https://hydra.nixos.org/build/233244079 at 2023-09-02
47684764 - proteaaudio # failure in job https://hydra.nixos.org/build/233225498 at 2023-09-02
47694769- - proto3-wire # failure in job https://hydra.nixos.org/build/233208217 at 2023-09-02
47704765 - protocol-buffers # failure in job https://hydra.nixos.org/build/233220653 at 2023-09-02
47714766 - protocol-buffers-fork # failure in job https://hydra.nixos.org/build/233228361 at 2023-09-02
47724767 - protocol # failure in job https://hydra.nixos.org/build/233224436 at 2023-09-02
47734773- - proto-lens-arbitrary # failure in job https://hydra.nixos.org/build/233239393 at 2023-09-02
47744768 - proto-lens-combinators # failure in job https://hydra.nixos.org/build/252726979 at 2024-03-16
47754769 - protolude-lifted # failure in job https://hydra.nixos.org/build/233196312 at 2023-09-02
47764770 - proton-haskell # failure in job https://hydra.nixos.org/build/233214383 at 2023-09-02
···49374931 - record-encode # failure in job https://hydra.nixos.org/build/233216156 at 2023-09-02
49384932 - record # failure in job https://hydra.nixos.org/build/233242406 at 2023-09-02
49394933 - records # failure in job https://hydra.nixos.org/build/233254822 at 2023-09-02
49404940- - records-sop # failure in job https://hydra.nixos.org/build/233251652 at 2023-09-02
49414934 - record-wrangler # failure in job https://hydra.nixos.org/build/233212838 at 2023-09-02
49424935 - rec-smallarray # failure in job https://hydra.nixos.org/build/233258592 at 2023-09-02
49434936 - recursive-line-count # failure in job https://hydra.nixos.org/build/252736942 at 2024-03-16
···56845677 - stm-firehose # failure in job https://hydra.nixos.org/build/233220943 at 2023-09-02
56855678 - stm-lifted # failure in job https://hydra.nixos.org/build/252726872 at 2024-03-16
56865679 - stm-promise # failure in job https://hydra.nixos.org/build/233204293 at 2023-09-02
56805680+ - stm-queue # failure in job https://hydra.nixos.org/build/259624889 at 2024-05-15
56875681 - stm-stats # failure in job https://hydra.nixos.org/build/233214914 at 2023-09-02
56885682 - stochastic # failure in job https://hydra.nixos.org/build/233242019 at 2023-09-02
56895683 - Stomp # failure in job https://hydra.nixos.org/build/233252583 at 2023-09-02
···62906284 - universal-binary # failure in job https://hydra.nixos.org/build/233240583 at 2023-09-02
62916285 - universe-instances-base # failure in job https://hydra.nixos.org/build/233197845 at 2023-09-02
62926286 - universe-instances-trans # failure in job https://hydra.nixos.org/build/233235623 at 2023-09-02
62936293- - universe-some # failure in job https://hydra.nixos.org/build/233254356 at 2023-09-02
62946287 - unix-handle # failure in job https://hydra.nixos.org/build/233233273 at 2023-09-02
62956288 - unix-memory # failure in job https://hydra.nixos.org/build/252735802 at 2024-03-16
62966289 - unix-process-conduit # failure in job https://hydra.nixos.org/build/233191509 at 2023-09-02
···6363 addPkgLocalList $out ${octave}
64646565 wrapOctavePrograms "${lib.concatStringsSep " " packages}"
6666+ # We also need to modify the Exec= line of the desktop file, so it will point
6767+ # to the wrapper we generated above.
6868+ rm $out/share/applications # should be a symlink to ${octave}/share/applications
6969+ mkdir $out/share/applications
7070+ substitute \
7171+ ${octave}/share/applications/org.octave.Octave.desktop \
7272+ $out/share/applications/org.octave.Octave.desktop \
7373+ --replace-fail ${octave}/bin/octave $out/bin/octave
6674 '' + postBuild;
67756876 inherit (octave) meta;
···3232 # Contents of a non-default UserSettings.hs to use when building hadrian, if any.
3333 # Should be a string or null.
3434, userSettings ? null
3535- # Whether to pass --hyperlinked-source to haddock or not. This is a custom
3636- # workaround as we wait for this to be configurable via userSettings or similar.
3737- # https://gitlab.haskell.org/ghc/ghc/-/issues/23625
3838-, enableHyperlinkedSource ? false
3935}:
40364137let
···5046in
51475248callPackage' ./hadrian.nix ({
5353- inherit userSettings enableHyperlinkedSource;
4949+ inherit userSettings;
5450} // lib.optionalAttrs (lib.versionAtLeast ghcVersion "9.9") {
5551 # Starting with GHC 9.9 development, additional in tree packages are required
5652 # to build hadrian. (Hackage-released conditional dependencies are handled
+3-3
pkgs/development/tools/melange/default.nix
···6677buildGoModule rec {
88 pname = "melange";
99- version = "0.6.11";
99+ version = "0.7.0";
10101111 src = fetchFromGitHub {
1212 owner = "chainguard-dev";
1313 repo = pname;
1414 rev = "v${version}";
1515- hash = "sha256-/P85vrcKWZHXNUIlzLpc9v0I5KEL7HUyr1SM2207l7o=";
1515+ hash = "sha256-RkX6jS3Oh0pRn7kwNDRi8RQ2apLx3W82yQYI1JLJXjQ=";
1616 # populate values that require us to use git. By doing this in postFetch we
1717 # can delete .git afterwards and maintain better reproducibility of the src.
1818 leaveDotGit = true;
···2525 '';
2626 };
27272828- vendorHash = "sha256-R1Fo4N5q00ePkddOJKauC6iDPGMYk15FIKEXqWy6ifQ=";
2828+ vendorHash = "sha256-0IBpnwAkvrGkll/mE67BXb/TmwYJyX2oG/aBqsKcn4g=";
29293030 subPackages = [ "." ];
3131