update
This commit is contained in:
parent
6cb94f531a
commit
1564605890
3 changed files with 146 additions and 27 deletions
83
flake.lock
generated
83
flake.lock
generated
|
@ -1,5 +1,21 @@
|
||||||
{
|
{
|
||||||
"nodes": {
|
"nodes": {
|
||||||
|
"flake-compat": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1696426674,
|
||||||
|
"narHash": "sha256-kvjfFW7WAETZlt09AgDn1MrtKzP7t90Vf7vypd3OL1U=",
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"rev": "0f9255e01c2351cc7d116c072cb317785dd33b33",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "edolstra",
|
||||||
|
"repo": "flake-compat",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"flake-parts": {
|
"flake-parts": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs-lib": "nixpkgs-lib"
|
"nixpkgs-lib": "nixpkgs-lib"
|
||||||
|
@ -18,6 +34,49 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"gitignore": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"hooks",
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1709087332,
|
||||||
|
"narHash": "sha256-HG2cCnktfHsKV0s4XW83gU3F57gaTljL9KNSuG6bnQs=",
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"rev": "637db329424fd7e46cf4185293b9cc8c88c95394",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "hercules-ci",
|
||||||
|
"repo": "gitignore.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"hooks": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-compat": "flake-compat",
|
||||||
|
"gitignore": "gitignore",
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749636823,
|
||||||
|
"narHash": "sha256-WUaIlOlPLyPgz9be7fqWJA5iG6rHcGRtLERSCfUDne4=",
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"rev": "623c56286de5a3193aa38891a6991b28f9bab056",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "cachix",
|
||||||
|
"repo": "git-hooks.nix",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1749285348,
|
"lastModified": 1749285348,
|
||||||
|
@ -52,7 +111,29 @@
|
||||||
"root": {
|
"root": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"flake-parts": "flake-parts",
|
"flake-parts": "flake-parts",
|
||||||
"nixpkgs": "nixpkgs"
|
"hooks": "hooks",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"treefmt": "treefmt"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"treefmt": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": [
|
||||||
|
"nixpkgs"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1749194973,
|
||||||
|
"narHash": "sha256-eEy8cuS0mZ2j/r/FE0/LYBSBcIs/MKOIVakwHVuqTfk=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"rev": "a05be418a1af1198ca0f63facb13c985db4cb3c5",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "treefmt-nix",
|
||||||
|
"type": "github"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
54
flake.nix
54
flake.nix
|
@ -4,25 +4,59 @@
|
||||||
inputs = {
|
inputs = {
|
||||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
|
hooks = {
|
||||||
|
url = "github:cachix/git-hooks.nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
treefmt = {
|
||||||
|
url = "github:numtide/treefmt-nix";
|
||||||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs = {
|
outputs =
|
||||||
|
{
|
||||||
self,
|
self,
|
||||||
nixpkgs,
|
nixpkgs,
|
||||||
flake-parts,
|
flake-parts,
|
||||||
} @ inputs:
|
hooks,
|
||||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
treefmt,
|
||||||
|
}@inputs:
|
||||||
|
flake-parts.lib.mkFlake { inherit inputs; } {
|
||||||
|
imports = [
|
||||||
|
hooks.flakeModule
|
||||||
|
treefmt.flakeModule
|
||||||
|
];
|
||||||
|
|
||||||
systems = nixpkgs.lib.systems.flakeExposed;
|
systems = nixpkgs.lib.systems.flakeExposed;
|
||||||
|
|
||||||
perSystem = {lib, pkgs, ...}: {
|
perSystem =
|
||||||
packages = let
|
{
|
||||||
packages = lib.packagesFromDirectoryRecursive {
|
config,
|
||||||
inherit (pkgs) callPackage;
|
pkgs,
|
||||||
directory = ./packages;
|
...
|
||||||
|
}:
|
||||||
|
{
|
||||||
|
treefmt = {
|
||||||
|
projectRootFile = "flake.nix";
|
||||||
|
|
||||||
|
programs.nixfmt = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.nixfmt-rfc-style;
|
||||||
};
|
};
|
||||||
in packages // {
|
|
||||||
default = packages.helix;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pre-commit.settings.hooks = {
|
||||||
|
treefmt.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells.default = pkgs.mkShellNoCC {
|
||||||
|
shellHook = ''
|
||||||
|
${config.pre-commit.installationScript}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
packages.default = pkgs.callPackage ./package.nix { };
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,8 @@
|
||||||
symlinkJoin,
|
symlinkJoin,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
pkgs,
|
pkgs,
|
||||||
}: let
|
}:
|
||||||
|
let
|
||||||
languageServers = [
|
languageServers = [
|
||||||
# C & C++
|
# C & C++
|
||||||
pkgs.clang-tools
|
pkgs.clang-tools
|
||||||
|
@ -60,17 +61,20 @@
|
||||||
pkgs.wl-clipboard
|
pkgs.wl-clipboard
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
symlinkJoin {
|
symlinkJoin {
|
||||||
inherit (helix) pname version meta passthru;
|
inherit (helix)
|
||||||
|
pname
|
||||||
|
version
|
||||||
|
meta
|
||||||
|
passthru
|
||||||
|
;
|
||||||
|
|
||||||
paths = [helix];
|
paths = [ helix ];
|
||||||
|
|
||||||
buildInputs = [makeWrapper];
|
buildInputs = [ makeWrapper ];
|
||||||
|
|
||||||
postBuild = ''
|
postBuild = ''
|
||||||
wrapProgram $out/bin/${helix.meta.mainProgram} \
|
wrapProgram $out/bin/${helix.meta.mainProgram} \
|
||||||
--suffix PATH : ${pkgs.lib.makeBinPath (
|
--suffix PATH : ${pkgs.lib.makeBinPath (languageServers ++ debugAdapters ++ clipboardProviders)}
|
||||||
languageServers ++ debugAdapters ++ clipboardProviders
|
|
||||||
)}
|
|
||||||
'';
|
'';
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue