Add Nix flake build files
This commit is contained in:
parent
111cc916c6
commit
7549a73811
3 changed files with 82 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -10,6 +10,7 @@
|
|||
/tools/wiimote
|
||||
/virtualkeyboard
|
||||
/xboxdrv
|
||||
/result
|
||||
cache/
|
||||
config.log
|
||||
custom.py
|
||||
|
|
43
flake.lock
Normal file
43
flake.lock
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"nodes": {
|
||||
"flake-utils": {
|
||||
"locked": {
|
||||
"lastModified": 1644229661,
|
||||
"narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1646011258,
|
||||
"narHash": "sha256-+aen4zu5uVp52arEcgL2maCS0zQDuG1t+Azwd/O1gN4=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "a25df4c2b79c4343bcc72ad671200e5a3e286c41",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"ref": "nixos-21.11",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"flake-utils": "flake-utils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
38
flake.nix
Normal file
38
flake.nix
Normal file
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
description = "Xbox360 USB Gamepad Userspace Driver";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
|
||||
flake-utils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, flake-utils }:
|
||||
flake-utils.lib.eachDefaultSystem (system:
|
||||
let
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
in rec {
|
||||
packages = flake-utils.lib.flattenTree {
|
||||
xboxdrv = pkgs.stdenv.mkDerivation {
|
||||
pname = "xboxdrv";
|
||||
version = "0.8.8";
|
||||
src = nixpkgs.lib.cleanSource ./.;
|
||||
enableParallelBuilding = true;
|
||||
nativeBuildInputs = [
|
||||
pkgs.scons
|
||||
pkgs.pkg-config
|
||||
];
|
||||
installPhase = ''
|
||||
make install PREFIX=$out
|
||||
'';
|
||||
buildInputs = [
|
||||
pkgs.xorg.libX11
|
||||
pkgs.libusb1
|
||||
pkgs.boost
|
||||
pkgs.glib
|
||||
pkgs.dbus-glib
|
||||
];
|
||||
};
|
||||
};
|
||||
defaultPackage = packages.xboxdrv;
|
||||
});
|
||||
}
|
Loading…
Reference in a new issue