mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 11:23:29 +00:00
emacs: factor out common overrides for nongnu packages
This commit is contained in:
parent
9928ed446d
commit
e2479ad6d8
@ -0,0 +1,21 @@
|
||||
pkgs:
|
||||
|
||||
self: super:
|
||||
|
||||
{
|
||||
p4-16-mode = super.p4-16-mode.overrideAttrs {
|
||||
# workaround https://github.com/NixOS/nixpkgs/issues/301795
|
||||
prePatch = ''
|
||||
mkdir tmp-untar-dir
|
||||
pushd tmp-untar-dir
|
||||
|
||||
tar --extract --verbose --file=$src
|
||||
content_directory=$(echo p4-16-mode-*)
|
||||
cp --verbose $content_directory/p4-16-mode-pkg.el $content_directory/p4-pkg.el
|
||||
src=$PWD/$content_directory.tar
|
||||
tar --create --verbose --file=$src $content_directory
|
||||
|
||||
popd
|
||||
'';
|
||||
};
|
||||
}
|
@ -10,7 +10,11 @@
|
||||
3. Run `git commit -m "nongnu-devel-packages $(date -Idate)" -- nongnu-devel-generated.nix`
|
||||
*/
|
||||
|
||||
{ lib, buildPackages }:
|
||||
{
|
||||
lib,
|
||||
pkgs,
|
||||
buildPackages,
|
||||
}:
|
||||
|
||||
self:
|
||||
let
|
||||
@ -35,26 +39,15 @@ let
|
||||
|
||||
super = imported;
|
||||
|
||||
overrides = {
|
||||
p4-16-mode = super.p4-16-mode.overrideAttrs {
|
||||
# workaround https://github.com/NixOS/nixpkgs/issues/301795
|
||||
prePatch = ''
|
||||
mkdir tmp-untar-dir
|
||||
pushd tmp-untar-dir
|
||||
commonOverrides = import ./nongnu-common-overrides.nix pkgs;
|
||||
|
||||
tar --extract --verbose --file=$src
|
||||
content_directory=$(echo p4-16-mode-*)
|
||||
cp --verbose $content_directory/p4-16-mode-pkg.el $content_directory/p4-pkg.el
|
||||
src=$PWD/$content_directory.tar
|
||||
tar --create --verbose --file=$src $content_directory
|
||||
|
||||
popd
|
||||
'';
|
||||
};
|
||||
};
|
||||
overrides = self: super: { };
|
||||
|
||||
in
|
||||
super // overrides
|
||||
let
|
||||
super' = super // (commonOverrides self super);
|
||||
in
|
||||
super' // (overrides self super')
|
||||
);
|
||||
|
||||
in
|
||||
|
@ -12,7 +12,7 @@ To update the list of packages from nongnu (ELPA),
|
||||
|
||||
*/
|
||||
|
||||
{ lib, buildPackages }:
|
||||
{ lib, pkgs, buildPackages }:
|
||||
|
||||
self: let
|
||||
|
||||
@ -29,24 +29,11 @@ self: let
|
||||
|
||||
super = imported;
|
||||
|
||||
overrides = {
|
||||
p4-16-mode = super.p4-16-mode.overrideAttrs {
|
||||
# workaround https://github.com/NixOS/nixpkgs/issues/301795
|
||||
prePatch = ''
|
||||
mkdir tmp-untar-dir
|
||||
pushd tmp-untar-dir
|
||||
commonOverrides = import ./nongnu-common-overrides.nix pkgs;
|
||||
|
||||
tar --extract --verbose --file=$src
|
||||
content_directory=$(echo p4-16-mode-*)
|
||||
cp --verbose $content_directory/p4-16-mode-pkg.el $content_directory/p4-pkg.el
|
||||
src=$PWD/$content_directory.tar
|
||||
tar --create --verbose --file=$src $content_directory
|
||||
overrides = self: super: { };
|
||||
|
||||
popd
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
in super // overrides);
|
||||
in
|
||||
let super' = super // (commonOverrides self super); in super' // (overrides self super'));
|
||||
|
||||
in generateNongnu { }
|
||||
|
@ -34,12 +34,12 @@ let
|
||||
};
|
||||
|
||||
mkNongnuDevelPackages = { pkgs, lib }: import ../applications/editors/emacs/elisp-packages/nongnu-devel-packages.nix {
|
||||
inherit (pkgs) buildPackages;
|
||||
inherit (pkgs) pkgs buildPackages;
|
||||
inherit lib;
|
||||
};
|
||||
|
||||
mkNongnuPackages = { pkgs, lib }: import ../applications/editors/emacs/elisp-packages/nongnu-packages.nix {
|
||||
inherit (pkgs) buildPackages;
|
||||
inherit (pkgs) pkgs buildPackages;
|
||||
inherit lib;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user