Add patches from emacs-plus

This commit is contained in:
larstvei 2024-07-20 17:42:22 +02:00
parent 744d7d9863
commit f5b789277d
2 changed files with 49 additions and 154 deletions

View File

@ -1,17 +1,13 @@
{ {
"nodes": { "nodes": {
"emacs-config": { "emacs-config": {
"inputs": { "flake": false,
"emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
},
"locked": { "locked": {
"lastModified": 1721434799, "lastModified": 1721474679,
"narHash": "sha256-BRP4bCKvgyJAoE/x2faWldh41t236YdwiOzcwBzQSe0=", "narHash": "sha256-CoT9hB3JuRYi9ZZTvjcXKmlp65/oQT0JhbCnWKpOidI=",
"owner": "larstvei", "owner": "larstvei",
"repo": "dot-emacs", "repo": "dot-emacs",
"rev": "f82b34ffb2c5d6aa2cdc5ebae38a4f24d217ff2d", "rev": "047d681931f4dd31ef6cac09dca4f79ea6a1b4fa",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -27,11 +23,11 @@
"nixpkgs-stable": "nixpkgs-stable" "nixpkgs-stable": "nixpkgs-stable"
}, },
"locked": { "locked": {
"lastModified": 1720256942, "lastModified": 1721466565,
"narHash": "sha256-ohfS5d4yR+zdLTICE78rNJmqL/en0BNPGm5zCK6N0QA=", "narHash": "sha256-OKRGw6BP/6+Nr3xi7wooyR8cSgJerE/0oaLUMRcCQXY=",
"owner": "nix-community", "owner": "nix-community",
"repo": "emacs-overlay", "repo": "emacs-overlay",
"rev": "6d9837126e1be779c8f34ed9fdd609e676a1b891", "rev": "f5e69f54e55881c07792e278f622f7efb2146ef9",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -40,23 +36,19 @@
"type": "github" "type": "github"
} }
}, },
"emacs-overlay_2": { "emacs-plus": {
"inputs": { "flake": false,
"flake-utils": "flake-utils_3",
"nixpkgs": "nixpkgs_3",
"nixpkgs-stable": "nixpkgs-stable_2"
},
"locked": { "locked": {
"lastModified": 1721437571, "lastModified": 1721032571,
"narHash": "sha256-w+FGfufCj2mugklWPycL8j4lM3gKrKgP3Fr4ez4GyGo=", "narHash": "sha256-jKTOwbm0cNp8D5pinF4wtn5beQRlLmsnClg+8ooDkX0=",
"owner": "nix-community", "owner": "d12frosted",
"repo": "emacs-overlay", "repo": "homebrew-emacs-plus",
"rev": "b31005958cab83f8ea0683bfde0fa2df74d310a1", "rev": "323d86b2685a2420341e648bbc6c7b7c02029fa9",
"type": "github" "type": "github"
}, },
"original": { "original": {
"owner": "nix-community", "owner": "d12frosted",
"repo": "emacs-overlay", "repo": "homebrew-emacs-plus",
"type": "github" "type": "github"
} }
}, },
@ -96,49 +88,13 @@
"type": "github" "type": "github"
} }
}, },
"flake-utils_3": {
"inputs": {
"systems": "systems_3"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_4": {
"inputs": {
"systems": "systems_4"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1720031269, "lastModified": 1721379653,
"narHash": "sha256-rwz8NJZV+387rnWpTYcXaRNvzUSnnF9aHONoJIYmiUQ=", "narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "9f4128e00b0ae8ec65918efeba59db998750ead6", "rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -149,22 +105,6 @@
} }
}, },
"nixpkgs-stable": { "nixpkgs-stable": {
"locked": {
"lastModified": 1719957072,
"narHash": "sha256-gvFhEf5nszouwLAkT9nWsDzocUTqLWHuL++dvNjMp9I=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7144d6241f02d171d25fba3edeaf15e0f2592105",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-23.11",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs-stable_2": {
"locked": { "locked": {
"lastModified": 1721226092, "lastModified": 1721226092,
"narHash": "sha256-UBvzVpo5sXSi2S/Av+t+Q+C2mhMIw/LBEZR+d6NMjws=", "narHash": "sha256-UBvzVpo5sXSi2S/Av+t+Q+C2mhMIw/LBEZR+d6NMjws=",
@ -182,43 +122,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1720181791, "lastModified": 1721435672,
"narHash": "sha256-i4vJL12/AdyuQuviMMd1Hk2tsGt02hDNhA0Zj1m16N8=", "narHash": "sha256-VaBqKvCu4iFWPwKFFigdhOfgccLUDEVByb6Wa2Z9i98=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "4284c2b73c8bce4b46a6adf23e16d9e2ec8da4bb", "rev": "2d65995365a2a6b05db69e344d3b673c8d541bcd",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_3": {
"locked": {
"lastModified": 1721379653,
"narHash": "sha256-8MUgifkJ7lkZs3u99UDZMB4kbOxvMEXQZ31FO3SopZ0=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "1d9c2c9b3e71b9ee663d11c5d298727dace8d374",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"nixpkgs_4": {
"locked": {
"lastModified": 1721403608,
"narHash": "sha256-X5+QA5K3J2KA20YEaBJ+GKDj/XIb5PutHmphgYQUszA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "ad0111043c09f7d0f6b9f039882cbf350d4f7d49",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -231,9 +139,10 @@
"root": { "root": {
"inputs": { "inputs": {
"emacs-config": "emacs-config", "emacs-config": "emacs-config",
"emacs-overlay": "emacs-overlay_2", "emacs-overlay": "emacs-overlay",
"flake-utils": "flake-utils_4", "emacs-plus": "emacs-plus",
"nixpkgs": "nixpkgs_4" "flake-utils": "flake-utils_2",
"nixpkgs": "nixpkgs_2"
} }
}, },
"systems": { "systems": {
@ -265,36 +174,6 @@
"repo": "default", "repo": "default",
"type": "github" "type": "github"
} }
},
"systems_3": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"systems_4": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
} }
}, },
"root": "root", "root": "root",

View File

@ -5,22 +5,38 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils"; flake-utils.url = "github:numtide/flake-utils";
emacs-overlay.url = "github:nix-community/emacs-overlay"; emacs-overlay.url = "github:nix-community/emacs-overlay";
emacs-config.url = "github:larstvei/dot-emacs"; emacs-config = {
url = "github:larstvei/dot-emacs";
flake = false;
};
emacs-plus = {
url = "github:d12frosted/homebrew-emacs-plus";
flake = false;
};
}; };
outputs = { self, nixpkgs, flake-utils, emacs-overlay, emacs-config }: outputs =
{ self, nixpkgs, flake-utils, emacs-overlay, emacs-plus, emacs-config }:
flake-utils.lib.eachDefaultSystem (system: flake-utils.lib.eachDefaultSystem (system:
let let
pkgs = import nixpkgs { pkgs = import nixpkgs {
inherit system; inherit system;
overlays = [ overlays =
emacs-overlay.overlays.emacs [ emacs-overlay.overlays.emacs emacs-overlay.overlays.package ];
emacs-overlay.overlays.package
];
}; };
patched-emacs = (pkgs.emacs-git).overrideAttrs (o: {
patches = [
"${emacs-plus}/patches/emacs-31/fix-window-role.patch"
"${emacs-plus}/patches/emacs-31/poll.patch"
"${emacs-plus}/patches/emacs-31/round-undecorated-frame.patch"
"${emacs-plus}/patches/emacs-31/system-appearance.patch"
];
});
in { in {
defaultPackage = pkgs.emacsWithPackagesFromUsePackage { defaultPackage = pkgs.emacsWithPackagesFromUsePackage {
config = emacs-config + "/init.org"; config = "${emacs-config}/init.org";
package = patched-emacs;
defaultInitFile = true; defaultInitFile = true;
alwaysEnsure = true; alwaysEnsure = true;
alwaysTangle = true; alwaysTangle = true;