zellij/nix/crate2nix.nix
a-kenji 1481fdf63f
build(nix): apply overrrides correctly (#1194)
Overrides in the global scope dont apply all
attributes for the package in `crate2nix`.
2022-03-09 08:52:52 +01:00

34 lines
670 B
Nix

{ pkgs
, crate2nix
, name
, src
, postInstall
, nativeBuildInputs
, desktopItems
, meta
}:
let
inherit (import "${crate2nix}/tools.nix" { inherit pkgs; })
generatedCargoNix;
project = import
(generatedCargoNix {
inherit name src;
})
{
inherit pkgs;
buildRustCrateForPkgs = pkgs:
pkgs.buildRustCrate.override {
defaultCrateOverrides = pkgs.defaultCrateOverrides // {
# Crate dependency overrides go here
zellij = attrs: {
inherit postInstall desktopItems meta name nativeBuildInputs;
};
};
};
};
in
project.workspaceMembers.zellij.build