Update nixpkgs and change how we build kak-lsp

We used to duplicate how the `kak-lsp` package in the nixpkgs
repo do it, now we just use `crane`.
This commit is contained in:
Natsu Kagami 2022-09-02 23:07:53 +02:00
parent 107287663b
commit 7b7a3ee8a2
Signed by: nki
GPG key ID: 7306B3D3C3AD6E51
5 changed files with 111 additions and 64 deletions

View file

@ -1,5 +1,27 @@
{
"nodes": {
"crane": {
"inputs": {
"flake-compat": "flake-compat",
"flake-utils": "flake-utils",
"nixpkgs": [
"nixpkgs-unstable"
]
},
"locked": {
"lastModified": 1661875961,
"narHash": "sha256-f1h/2c6Teeu1ofAHWzrS8TwBPcnN+EEu+z1sRVmMQTk=",
"owner": "ipetkov",
"repo": "crane",
"rev": "d9f394e4e20e97c2a60c3ad82c2b6ef99be19e24",
"type": "github"
},
"original": {
"owner": "ipetkov",
"repo": "crane",
"type": "github"
}
},
"darwin": {
"inputs": {
"nixpkgs": [
@ -7,11 +29,11 @@
]
},
"locked": {
"lastModified": 1657835815,
"narHash": "sha256-CnZszAYpNKydh6N7+xg+eRtWNVoAAGqc6bg+Lpgq1xc=",
"lastModified": 1661882940,
"narHash": "sha256-4LaVFnV22WrOA0aolqqk9dXrM8crikcrLQt29G18F7M=",
"owner": "lnl7",
"repo": "nix-darwin",
"rev": "54a24f042f93c79f5679f133faddedec61955cf2",
"rev": "80cec5115aae74accc4ccfb9f84306d7863f0632",
"type": "github"
},
"original": {
@ -23,7 +45,7 @@
},
"deploy-rs": {
"inputs": {
"flake-compat": "flake-compat",
"flake-compat": "flake-compat_2",
"nixpkgs": "nixpkgs",
"utils": "utils"
},
@ -42,6 +64,22 @@
}
},
"flake-compat": {
"flake": false,
"locked": {
"lastModified": 1650374568,
"narHash": "sha256-Z+s0J8/r907g149rllvwhb4pKi8Wam5ij0st8PwAh+E=",
"owner": "edolstra",
"repo": "flake-compat",
"rev": "b4a34015c698c7793d592d66adbab377907a2be8",
"type": "github"
},
"original": {
"owner": "edolstra",
"repo": "flake-compat",
"type": "github"
}
},
"flake-compat_2": {
"flake": false,
"locked": {
"lastModified": 1648199409,
@ -59,11 +97,11 @@
},
"flake-utils": {
"locked": {
"lastModified": 1656928814,
"narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=",
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
@ -73,6 +111,21 @@
}
},
"flake-utils_2": {
"locked": {
"lastModified": 1659877975,
"narHash": "sha256-zllb8aq3YO3h8B/U0/J1WBgAL8EX5yWf5pMj3G0NAmc=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "c0e246b9b83f637f4681389ecabcb2681b4f3af0",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"flake-utils_3": {
"locked": {
"lastModified": 1648297722,
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
@ -111,11 +164,11 @@
"kak-lsp": {
"flake": false,
"locked": {
"lastModified": 1659727672,
"narHash": "sha256-MI6VUj7idX/Fe/dOJ41jjykGPJDLzpqqG8YtLnYM7lM=",
"lastModified": 1662039136,
"narHash": "sha256-YqKH+yydZYcu05TWq2BRcsCMpXOuE0v7Y8ZloDmzjrE=",
"owner": "kak-lsp",
"repo": "kak-lsp",
"rev": "9be6796246b2527f31363826fc32a5f5b3345b08",
"rev": "715dae018180fda430808dbb8e015e892994d042",
"type": "github"
},
"original": {
@ -127,11 +180,11 @@
"kakoune": {
"flake": false,
"locked": {
"lastModified": 1659523064,
"narHash": "sha256-kY/b+BHZtUj2rYfJv7edmF56jVYMLFb17aJEWNKqOaI=",
"lastModified": 1660986183,
"narHash": "sha256-210rD4x/FRbJYzGfDIqGuWmz+n53MG8PghlXDWP5NBI=",
"owner": "mawww",
"repo": "kakoune",
"rev": "31e9fc3cefcbea03d4eaad75ed0dab3da8f3dc6f",
"rev": "021da117cf90bf25b65e3344fa8e43ab4262b714",
"type": "github"
},
"original": {
@ -187,11 +240,11 @@
"nixpkgs": "nixpkgs_2"
},
"locked": {
"lastModified": 1659340932,
"narHash": "sha256-CEeGgZLN5ukOrbvwKTh66miEQ3cA2poH4tko6C7ULS4=",
"lastModified": 1662058655,
"narHash": "sha256-tXqsxLNjYUdzD90XsrMAGlXR3n7t1fxe92bXOa3CL2Y=",
"owner": "fufexan",
"repo": "nix-gaming",
"rev": "69b8118d92c5bd135f2d139d87fb01d34de9a244",
"rev": "e5a9b43c5012f7ca480d45b468e379de34caca15",
"type": "github"
},
"original": {
@ -218,11 +271,11 @@
},
"nixpkgs-22_05": {
"locked": {
"lastModified": 1659228671,
"narHash": "sha256-fraIjyAthUgoeDUF14tFeszKFPqaGnlc2qxczHbAmec=",
"lastModified": 1661656705,
"narHash": "sha256-1ujNuL1Tx1dt8dC/kuYS329ZZgiXXmD96axwrqsUY7w=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a26a6f4529878fbfe5f1f287dcdff4a287c58def",
"rev": "290dbaacc1f0b783fd8e271b585ec2c8c3b03954",
"type": "github"
},
"original": {
@ -234,11 +287,11 @@
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1659782844,
"narHash": "sha256-tM/qhHFE61puBxh9ebP3BIG1fkRAT4rHqD3jCM0HXGY=",
"lastModified": 1661649871,
"narHash": "sha256-T0hk43hqfuzvlLvKCl1rf/JSlgL44dbzoxYJhT9pdT8=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "c85e56bb060291eac3fb3c75d4e0e64f6836fcfe",
"rev": "dbeff35a1acba6dcf0c10de94775727274914488",
"type": "github"
},
"original": {
@ -281,11 +334,11 @@
},
"nixpkgs_3": {
"locked": {
"lastModified": 1659768833,
"narHash": "sha256-G1T3le1SfZ0AIsWu4SnWr46A34OEiwFcHDKWHtBfBtg=",
"lastModified": 1662025319,
"narHash": "sha256-ZJlBQ7jXynq4+Jg9+DgOe8FJG8sDIeFFYP3V3K98KUs=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "72f492e275fc29d44b3a4daf952fbeffc4aed5b8",
"rev": "b82ccafb54163ab9024e893e578d840577785fea",
"type": "github"
},
"original": {
@ -313,11 +366,11 @@
},
"nixpkgs_5": {
"locked": {
"lastModified": 1659190188,
"narHash": "sha256-LudYrDFPFaQMW0l68TYkPWRPKmqpxIFU1nWfylIp9AQ=",
"lastModified": 1661353537,
"narHash": "sha256-1E2IGPajOsrkR49mM5h55OtYnU0dGyre6gl60NXKITE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "a3fddd46a7f3418d7e3940ded94701aba569161d",
"rev": "0e304ff0d9db453a4b230e9386418fd974d5804a",
"type": "github"
},
"original": {
@ -329,11 +382,11 @@
},
"nur": {
"locked": {
"lastModified": 1659846509,
"narHash": "sha256-eI47vTor0dGWdeNXP0g0TctWcCcZopUifJHqvfQtXUg=",
"lastModified": 1662109208,
"narHash": "sha256-/+GnYpT4IdL2MEApFl8Ep/ZhXZJNf8asZ7f2XYWp1EI=",
"owner": "nix-community",
"repo": "NUR",
"rev": "58ee99eaf9204abed58caa95f66f53bcc00498d0",
"rev": "ff12ab38093fcf9060a4f1036c12e97182026cb8",
"type": "github"
},
"original": {
@ -364,9 +417,10 @@
},
"root": {
"inputs": {
"crane": "crane",
"darwin": "darwin",
"deploy-rs": "deploy-rs",
"flake-utils": "flake-utils",
"flake-utils": "flake-utils_2",
"home-manager": "home-manager",
"kak-lsp": "kak-lsp",
"kakoune": "kakoune",
@ -401,11 +455,11 @@
"nixpkgs-22_05": "nixpkgs-22_05"
},
"locked": {
"lastModified": 1659441021,
"narHash": "sha256-J2C83bo1mHcdfzxk8S3rE8iqNZM2AlPUGqftdhbm5Zk=",
"lastModified": 1661660105,
"narHash": "sha256-3ITdkYwsNDh2DRqi7FZOJ92ui92NmcO6Nhj49u+JjWY=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "34ee98b8c2ca153a23a63c1841a0a067313856d5",
"rev": "d92fba1bfc9f64e4ccb533701ddd8590c0d8c74a",
"type": "github"
},
"original": {
@ -446,7 +500,7 @@
},
"youmubot": {
"inputs": {
"flake-utils": "flake-utils_2",
"flake-utils": "flake-utils_3",
"naersk": "naersk_2",
"nixpkgs": [
"nixpkgs"

View file

@ -12,7 +12,10 @@
deploy-rs.url = "github:Serokell/deploy-rs";
nur.url = "github:nix-community/NUR";
# --- Build tools
flake-utils.url = github:numtide/flake-utils;
crane.url = github:ipetkov/crane;
crane.inputs.nixpkgs.follows = "nixpkgs-unstable";
# ---
# Imported apps
@ -52,10 +55,10 @@
haskellDotNix = { ... }: {
# Binary Cache for Haskell.nix
nix.binaryCachePublicKeys = [
nix.settings.trusted-public-keys = [
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
nix.binaryCaches = [
nix.settings.substituters = [
"https://cache.iog.io"
];
};
@ -74,8 +77,8 @@
};
hardware.pulseaudio.enable = lib.mkOverride 0 false;
nix.binaryCaches = [ "https://nix-gaming.cachix.org" ];
nix.binaryCachePublicKeys = [ "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" ];
nix.settings.substituters = [ "https://nix-gaming.cachix.org" ];
nix.settings.trusted-public-keys = [ "nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4=" ];
environment.systemPackages = [ inputs.nix-gaming.packages.x86_64-linux.osu-stable ];
};

View file

@ -16,28 +16,13 @@ let
sha256 = "sha256-Q9kZ/XmXEsoZpflF5n16I5bsyS2S8gS9OYkOPM47ryg=";
}) + "/evince_synctex.py";
kak-lsp =
pkgs.unstable.rustPlatform.buildRustPackage
rec {
pname = "kak-lsp";
version = "r${builtins.substring 0 6 pkgs.sources.kak-lsp.rev}";
src = pkgs.sources.kak-lsp;
cargoSha256 = "sha256-UASQXntFdX69fa+9x1WZ+sCIgKDxklI4FWnTtQkhH5k=";
# cargoSha256 = lib.fakeSha256;
buildInputs = (with pkgs;
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ])
);
meta = with lib; {
description = "Kakoune Language Server Protocol Client";
homepage = "https://github.com/kak-lsp/kak-lsp";
license = with licenses; [ unlicense /* or */ mit ];
maintainers = [ maintainers.spacekookie ];
};
};
kak-lsp = pkgs.libs.crane.buildPackage {
src = pkgs.sources.kak-lsp;
buildInputs = (with pkgs;
lib.optionals stdenv.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ])
) ++ (with pkgs; [ libiconv ]
);
};
activationScript = text: pkgs.writeText "config.kak" ''
hook global KakBegin .* %{

View file

@ -142,8 +142,8 @@
];
# Nix config
nix.binaryCachePublicKeys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
nix.binaryCaches = [ "https://hydra.iohk.io" ];
nix.settings.trusted-public-keys = [ "hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=" ];
nix.settings.substituters = [ "https://hydra.iohk.io" ];
# Terminal

View file

@ -17,6 +17,10 @@ let
};
overlay-versioning = final: prev: { };
overlay-libs = final: prev: {
libs.crane = inputs.crane.lib.${prev.system};
};
in
[
(import ./overlays/openrazer)
@ -24,6 +28,7 @@ in
overlay-needs-unstable
overlay-imported
overlay-versioning
overlay-libs
nur.overlay
# Bug fixes