add nixos package (WIP)

This commit is contained in:
yuni 2024-04-26 23:16:03 +02:00
parent 61c41c9369
commit 9058e4a588
3 changed files with 64 additions and 0 deletions

20
src/build/nix/default.nix Normal file
View file

@ -0,0 +1,20 @@
{
rustPlatform
, pkg-config
, alsa-lib
, libcap
}:
rustPlatform.buildRustPackage rec {
src = ../../..;
pname = "outfly";
version = "0.8.0";
cargoLock = {
lockFile = "${src}/Cargo.lock";
};
nativeBuildInputs = [pkg-config];
buildInputs = [
alsa-lib
libcap
#libgcc
];
}

27
src/build/nix/flake.lock Normal file
View file

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1714076141,
"narHash": "sha256-Drmja/f5MRHZCskS6mvzFqxEaZMeciScCTFxWVLqWEY=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "7bb2ccd8cdc44c91edba16c48d2c8f331fb3d856",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

17
src/build/nix/flake.nix Normal file
View file

@ -0,0 +1,17 @@
{
description = "A breathtaking 3D space game in the rings of Jupiter";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }: {
packages.x86_64-linux.outfly = let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in pkgs.callPackage ./default.nix {};
packages.x86_64-linux.default = self.packages.x86_64-linux.outfly;
};
}