mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-12-02 06:44:56 +03:00
20 lines
432 B
Nix
20 lines
432 B
Nix
|
{
|
||
|
config,
|
||
|
lib,
|
||
|
dream2nix,
|
||
|
...
|
||
|
}: let
|
||
|
isSdist = lib.hasSuffix ".tar.gz" config.mkDerivation.src;
|
||
|
in {
|
||
|
deps = {nixpkgs, ...}: {
|
||
|
inherit (nixpkgs) postgresql;
|
||
|
};
|
||
|
|
||
|
# enable overrides from nixpkgs
|
||
|
imports = [dream2nix.modules.dream2nix.nixpkgs-overrides];
|
||
|
nixpkgs-overrides.enable = isSdist;
|
||
|
|
||
|
# add postgresql to nativeBuildInputs
|
||
|
mkDerivation.nativeBuildInputs = lib.mkIf isSdist [config.deps.postgresql];
|
||
|
}
|