Nix packaging
This commit is contained in:
parent
ab1edbf0f4
commit
5bf7130e39
4 changed files with 85 additions and 35 deletions
|
@ -24,7 +24,10 @@
|
|||
inputs.git-hooks.flakeModule
|
||||
inputs.treefmt-nix.flakeModule
|
||||
|
||||
# This is until zls 0.12 is merged
|
||||
./nix/zls
|
||||
|
||||
./nix/vegetable-hamper
|
||||
];
|
||||
|
||||
perSystem =
|
||||
|
@ -47,6 +50,8 @@
|
|||
};
|
||||
};
|
||||
|
||||
packages.default = config.packages.vegetable-hamper;
|
||||
|
||||
devShells.default =
|
||||
with pkgs;
|
||||
mkShell {
|
||||
|
|
35
nix/vegetable-hamper/default.nix
Normal file
35
nix/vegetable-hamper/default.nix
Normal file
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
perSystem =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
packages.vegetable-hamper = pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "vegetable-hamper";
|
||||
version = "0.1.0";
|
||||
|
||||
src = ../../.;
|
||||
|
||||
# langref = pkgs.fetchurl {
|
||||
# url = "https://raw.githubusercontent.com/ziglang/zig/a685ab1499d6560c523f0dbce2890dc140671e43/doc/langref.html.in";
|
||||
# hash = "sha256-7lFSfkVLOrn42nYnYyDmBkkRfM903lUUJZ5Sg+eBUpE=";
|
||||
# };
|
||||
|
||||
# zigBuildFlags = [ "-Dversion_data_path=${finalAttrs.langref}" ];
|
||||
|
||||
postPatch = ''
|
||||
ln -s ${pkgs.callPackage ./deps.nix { }} $ZIG_GLOBAL_CACHE_DIR/p
|
||||
'';
|
||||
|
||||
nativeBuildInputs = with pkgs; [
|
||||
zig_0_12.hook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = with pkgs; [
|
||||
wayland
|
||||
wayland-protocols
|
||||
wlroots_0_17
|
||||
wlr-protocols
|
||||
];
|
||||
});
|
||||
};
|
||||
}
|
13
nix/vegetable-hamper/deps.nix
Normal file
13
nix/vegetable-hamper/deps.nix
Normal file
|
@ -0,0 +1,13 @@
|
|||
# generated by zon2nix (https://github.com/nix-community/zon2nix)
|
||||
|
||||
{ linkFarm, fetchzip }:
|
||||
|
||||
linkFarm "zig-packages" [
|
||||
{
|
||||
name = "12205b33855e3634201e6777a06d9d50ff8f4477b47ef95024009dd3e60df7b269d3";
|
||||
path = fetchzip {
|
||||
url = "https://codeberg.org/ifreund/zig-wayland/archive/fe04636c866c6289b74c0803e621c9cc1bc1d1a4.tar.gz";
|
||||
hash = "sha256-PeNDvE/D9EPpmFxzhMxt6be6/7O6Ou/dYN8BuSNMHGQ=";
|
||||
};
|
||||
}
|
||||
]
|
|
@ -9,10 +9,7 @@
|
|||
perSystem =
|
||||
{ pkgs, lib, ... }:
|
||||
{
|
||||
packages.zls =
|
||||
let
|
||||
in
|
||||
pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||
packages.zls = pkgs.stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "zls";
|
||||
version = "0.12.0";
|
||||
|
||||
|
|
Loading…
Reference in a new issue