devenv
This commit is contained in:
parent
004b442296
commit
5b9fdb8172
5 changed files with 98 additions and 16 deletions
62
flake.nix
62
flake.nix
|
@ -1,21 +1,51 @@
|
|||
{
|
||||
description = "A wrapper for Helix that provides language support";
|
||||
|
||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
|
||||
outputs = {nixpkgs, ...}: let
|
||||
supportedSystems = nixpkgs.lib.systems.flakeExposed;
|
||||
forAllSupportedSystems = f:
|
||||
nixpkgs.lib.genAttrs supportedSystems (
|
||||
system:
|
||||
f (import nixpkgs {
|
||||
inherit system;
|
||||
config.allowUnfree = true;
|
||||
})
|
||||
);
|
||||
in {
|
||||
packages = forAllSupportedSystems (pkgs: {
|
||||
default = pkgs.callPackage ./package.nix {};
|
||||
});
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||
devenv-root = {
|
||||
url = "file+file:///dev/null";
|
||||
flake = false;
|
||||
};
|
||||
devenv.url = "github:cachix/devenv";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
nixpkgs,
|
||||
flake-parts,
|
||||
devenv,
|
||||
devenv-root,
|
||||
} @ inputs:
|
||||
flake-parts.lib.mkFlake {inherit inputs;} {
|
||||
imports = [
|
||||
devenv.flakeModule
|
||||
];
|
||||
|
||||
systems = nixpkgs.lib.systems.flakeExposed;
|
||||
|
||||
flake = {
|
||||
lib = nixpkgs.lib.extend (import ./lib.nix);
|
||||
|
||||
nixosConfigurations = self.lib.genNixosConfigurations {inherit inputs;};
|
||||
};
|
||||
|
||||
perSystem = {pkgs, ...}: {
|
||||
devenv.shells.default = {
|
||||
devenv.root = let
|
||||
devenvRootFileContent = builtins.readFile devenv-root.outPath;
|
||||
in
|
||||
pkgs.lib.mkIf (devenvRootFileContent != "") devenvRootFileContent;
|
||||
|
||||
name = "hxwrap";
|
||||
|
||||
imports = [
|
||||
./devenv.nix
|
||||
];
|
||||
};
|
||||
|
||||
packages.default = pkgs.callPackage ./package.nix {};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue