fix(nix): Rework cunicu derivation

Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
Steffen Vogel
2025-01-04 11:05:00 +01:00
parent 7853cf78a9
commit eab4fedda3
4 changed files with 9 additions and 11 deletions

View File

@@ -21,7 +21,7 @@
}; };
overlays = { overlays = {
default = final: prev: { cunicu = import ./nix/default.nix { pkgs = final; }; }; default = final: prev: { cunicu = final.callPackage ./nix/cunicu.nix { }; };
}; };
}; };
@@ -53,8 +53,9 @@
}; };
packages = { packages = {
cunicu = import ./nix/default.nix { inherit pkgs; }; inherit (pkgs) cunicu;
default = self'.packages.cunicu;
default = pkgs.cunicu;
}; };
}; };
}; };

View File

@@ -1,9 +1,9 @@
# SPDX-FileCopyrightText: 2023 Philipp Jungkamp <p.jungkamp@gmx.net> # SPDX-FileCopyrightText: 2023 Philipp Jungkamp <p.jungkamp@gmx.net>
# SPDX-FileCopyrightText: 2025 Steffen Vogel <post@steffenvogel.de>
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
{ {
lib, lib,
stdenv, stdenv,
src,
buildGoModule, buildGoModule,
installShellFiles, installShellFiles,
versionCheckHook, versionCheckHook,
@@ -14,15 +14,17 @@
}: }:
let let
version = "0.10.0"; version = "0.10.0";
src = ./..;
in in
buildGoModule { buildGoModule {
pname = "cunicu"; pname = "cunicu";
inherit src version; inherit version src;
vendorHash = "sha256-yFpkYI6ue5LXwRCj4EqWDBaO3TYzZ3Ov/39PRQWMWzk="; vendorHash = "sha256-yFpkYI6ue5LXwRCj4EqWDBaO3TYzZ3Ov/39PRQWMWzk=";
nativeBuildInputs = [ nativeBuildInputs = [
installShellFiles installShellFiles
protobuf protobuf
protoc-gen-go protoc-gen-go
protoc-gen-go-grpc protoc-gen-go-grpc

View File

@@ -1,6 +0,0 @@
# SPDX-FileCopyrightText: 2023 Philipp Jungkamp <p.jungkamp@gmx.net>
# SPDX-License-Identifier: Apache-2.0
{
pkgs ? import <nixpkgs> { },
}:
pkgs.callPackage ./cunicu.nix { src = ./..; }

View File

@@ -1,4 +1,5 @@
# SPDX-FileCopyrightText: 2023 Philipp Jungkamp <p.jungkamp@gmx.net> # SPDX-FileCopyrightText: 2023 Philipp Jungkamp <p.jungkamp@gmx.net>
# SPDX-FileCopyrightText: 2025 Steffen Vogel <post@steffenvogel.de>
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
{ self', pkgs, ... }: { self', pkgs, ... }:
pkgs.mkShell { pkgs.mkShell {