Actually we can do it all from a single package.nix

This commit is contained in:
rzuasti
2026-02-12 08:52:01 -05:00
parent d95803c773
commit 714c0c893d
3 changed files with 21 additions and 13 deletions
+1 -1
View File
@@ -55,7 +55,7 @@
});
# A Nixpkgs overlay that provides a 'oott' package.
overlays.default = final: prev: {oott = final.callPackage ./nix/package-backend.nix {};};
overlays.default = final: prev: {oott = final.callPackage ./nix/package.nix {};};
# Package definition
packages = forEachSystem (system: {
-12
View File
@@ -1,12 +0,0 @@
{pkgs}:
pkgs.rustPlatform.buildRustPackage rec {
pname = "oott";
version = "0.0.1";
src = ./../backend;
cargoLock = {
lockFile = ./../backend/Cargo.lock;
};
nativeBuildInputs = [pkgs.pkg-config];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
}
+20
View File
@@ -0,0 +1,20 @@
{pkgs}: let
oott-backend = pkgs.rustPlatform.buildRustPackage rec {
pname = "oott-backend";
version = "0.0.1";
src = ./../backend;
cargoLock = {
lockFile = ./../backend/Cargo.lock;
};
nativeBuildInputs = [pkgs.pkg-config];
PKG_CONFIG_PATH = "${pkgs.openssl.dev}/lib/pkgconfig";
};
in
pkgs.stdenv.mkDerivation {
name = "oott";
buildInputs = [oott-backend];
installPhase = ''
cp ${oott-backend}/bin/* $out/bin/
'';
}