Commit Graph

17 Commits

Author SHA1 Message Date
Hamish Mackenzie
6483dfaa92
Add gmodule pkg-config mapping (#1123) 2021-05-22 22:30:14 +12:00
Hamish Mackenzie
583acc2219
Fix for postgresql-libpg and musl (fixes #948) (#1056)
This combined with setting the `use-pkg-config` flag on `postgresql-libpq` should get it compiling.  There is still a problem with `openssl` that requires a `module` to fix the linking of executables.

Add the following to the `cabal.project` file or to `cabalProjectLocal`:

```
package postgresql-libpq
  flags: +use-pkg-config
```

Include a module like this one to include `openssl` in the linker arguments:

```nix
{
  modules = [(
   {pkgs, ...}: final.lib.mkIf pkgs.stdenv.hostPlatform.isMusl {
     # The order of -lssl and -lcrypto is important here
     packages.postgrest.configureFlags = [
       "--ghc-option=-optl=-lssl"
       "--ghc-option=-optl=-lcrypto"
       "--ghc-option=-optl=-L${pkgs.openssl.out}/lib"
     ];
  })];
}
```

This PR also adds a "hackage quirk" for `postgrest`  to that makes these changes for `postgrest` automatically when built it as a `tool` or with `hackage-package`.

Unfortunately we do not have a good way to avoid the need make these changes.
2021-02-24 22:49:31 +13:00
Jakub Kopański
36a85c8b34
Add vulkan to pkgconfig-map (#1001)
* Add vulkan to pkgconfig-map

* Explain decision to map vulkan to vulkan-loader
2021-01-18 12:51:59 +00:00
paumr
91a7fa9407 moved xorg packages to correct attributeset
I'm wondering how/if this worked before, i couldn't find most xorg
packages on their previous path.
(Neither on the current version of nixpkgs nor on nixpkgs anno 2018)
2021-01-01 23:27:56 +01:00
Marc Fontaine
86f391a012
add a pkgconf alias for libusb1 (#924) 2020-11-13 15:56:46 +00:00
Ollie Charles
f655e66777
Changes to allow opencv to be built (#834)
* Changes to allow opencv to be built

The opencv library needs:

1. pkgconfig for opencv should return OpenCV 3, not OpenCV 2 (which is
   what pkgs.opencv is)

2. hardeningDisable = [ "bindnow" ] (as per
   5ea490af76#)

This commit fixes (1) by adding an entry to lib/pkgconf-nixpkgs-map.nix,
and partially fixes (2) by adding a new `hardeningDisable` option to the
set of package options. The user will still need to specify:

  packages.opencv.hardeningDisable = [ "bindnow" ];

I'm not sure if there's a place to specify this as default in haskell.nix.

* Update comp-builder.nix
2020-09-08 00:28:38 +12:00
Hamish Mackenzie
6b37cca8bd
Fix for gi-harfbuzz 0.0.3 (#796)
It adds `pkgconfig-depends: harfbuzz-gobject >= 1`.  In nixpkgs
this is in the `harfbuzz` derivation so we need a mapping.
2020-08-01 15:29:32 +12:00
Hamish Mackenzie
5291959d28
Add propagatedBuildInputs to shell (#717)
Now that the pkgconfig inputs are here we need this to make them
show up in the shell.  Also adds gtkglext pkgconfig mapping.
2020-06-21 19:40:14 +12:00
Zhenya Vinogradov
7d4751b066
pkgconf-nixpkgs-map.nix: add libsecp256k1 (#616)
Used by `secp256k1-haskell` package
2020-05-18 18:39:07 +08:00
Robert Hensing
82115762ef
Add to nixpkgs map (#447)
* pkgconf-nixpkgs-map: Add nix dependencies

* system-nixpkgs-map: Add boost
2020-02-15 17:28:28 +13:00
Moritz Angermann
5884ab02be
Overlays (#261)
The Overlays branch

This is a major reorganization in how haskell.nix is used, and marks our 1.0 release.
The branch doesn't build due to numerous issues that we believe to be with the CI
and not this branch. We expect only very minor adjustments prior to calling this the
official 1.0 release.

* Move iohk-nix patches into haskell.nix

This moves the customizations we did in iohk-nix
into haskell.nix via overlays and config.

Add bootPkgs logic

this moves the nuking of bootPkgs where it belongs. This should eventually still be
removed and replaced by a proper solution, that doesn't require the nuking of
bootPkgs.

Allow us to bootstrap binary ghcs and a cabal-install

With this we can do the following:

```
$ nix repl compiler/old-ghc-nix
nix-repl> :b (let pkgs = import <nixpkgs> {}; in with import ./. {}; import ./compiler/bootstrap/cabal-install.nix { inherit (pkgs) fetchurl stdenv zlib; inherit hackage
; ghc = ghc844; src = pkgs.fetchurl { url = "https://github.com/haskell/cabal/archive/Cabal-v3.0.0.0-rc3.tar.gz"; sha256 = "1zl2mgg8307ykq3v8nmafc6zdhhj1cw7w8ffpap16dsm6
5lbnx33"; }; })
```

which wile it may look daunting, will allow us to bootstrap a
cabal-install with a ghc. From that point onwards, we should be able to
build any hackage package via haskell.nix.

Pass through cabal-install version

Better threading of arguments.

Add bootstrap overlay

Allow alex + happy to be built

This still has a wart: we need nix-tools, and for that we use the ghc865 from
nixpkgs. Ideally we'd build nix-tools against a specific ghc, but then
we'd need a build expression for that.

Make ghcjs work

Building something like this:
```
 nix build '(with import ./. { nixpkgs = ../nixpkgs; nixpkgsArgs = { crossSystem = { config = "js-unknown-ghcjs"; }; }; }; (haskell-nix.hackage-package { name = "hello"; version = "1.0.0.2"; })).components.exes.hello'
```
will now work. Assuming `nixpkgs` has been appropriately patched to support the `js-unknown-ghcjs` triple.

Also: this will need an additional `Cabal` patch, to make `Cabal` understand what it needs to do with: `dist/build/hello/hello: copyFile: does not exist (No such file or directory)`

It needs to learn that `dist/build/hello/hello.jsexe` is what it wants to copy and that that is a directory.  Luckily we do have some code in Cabal already that does this for `.exe` on windows.

Build `js-unknown-ghcjs` packages with haskell.nix

Using the following expression:
```
with import ./. { nixpkgs = ../nixpkgs; nixpkgsArgs = { crossSystem = { config = "js-unknown-ghcjs"; }; }; };
let Cabal = buildPackages.haskell-nix.hackage-package {
    name = "Cabal"; version = "2.4.1.0";
    modules = [
        { packages.Cabal.patches = [ ./Cabal-install-folder.diff ]; }
    ];
}; in
(haskell-nix.hackage-package {
    name = "hello"; version = "1.0.0.2";
    modules = [
    	    ({config, ... }:{ packages.hello.package.setup-depends = [ Cabal ]; })
    ];}).components.exes.hello
```
in a `test.nix` file. And running
```
nix build -f ./test.nix
```
on it, will produce
```
./result
├── bin
│   └── hello.jsexe
│       ├── all.js
│       ├── all.js.externs
│       ├── index.html
│       ├── lib.js
│       ├── manifest.webapp
│       ├── out.frefs.js
│       ├── out.frefs.json
│       ├── out.js
│       ├── out.stats
│       ├── rts.js
│       └── runmain.js
└── share
    └── doc
        └── x86_64-linux-ghc-8.6.5
            └── hello-1.0.0.2
                └── LICENSE

6 directories, 12 files
```
2019-10-21 20:07:58 +08:00
Hamish Mackenzie
b4b8a30c5d Add libsoup-2.4 to pkgconf-nixpkgs-map.nix (#234) 2019-09-10 13:32:24 +08:00
Rodney Lorrimar
234e9e091d
docs: Add some information about mapping non-Haskell dependencies (#200)
Relates to #198
2019-07-13 17:54:53 +10:00
Hamish Mackenzie
e632534506 Fix for haskell-gi packages (#148)
* Fix for haskell-gi packages

* Add comment explaining the hacky gi-* workaround
2019-06-02 21:14:14 +08:00
Hamish Mackenzie
7b438d8d74 Add more pkgconf mappings (#126) 2019-05-17 15:59:05 +08:00
Moritz Angermann
f08973b609 make it work 2018-10-30 15:32:31 +08:00
Moritz Angermann
39c570bda1 Preliminary new-package-set logic
Doens't fully work yet :(
2018-10-30 15:32:31 +08:00