its in a flake. IT MAKES A STATIC BINARY BABAYYYYYYY

This commit is contained in:
Shelvacu
2024-02-12 22:00:12 -08:00
parent f297f06ef0
commit ca11a62391
5 changed files with 66 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1 +1,2 @@
/target
/result

View File

@@ -1,3 +1,4 @@
{
"rust-client.channel": "stable"
"rust-client.channel": "stable",
"editor.tabSize": 2
}

26
flake.lock generated Normal file
View File

@@ -0,0 +1,26 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1707689078,
"narHash": "sha256-UUGmRa84ZJHpGZ1WZEBEUOzaPOWG8LZ0yPg1pdDF/yM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "f9d39fb9aff0efee4a3d5f4a6d7c17701d38a1d8",
"type": "github"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

6
flake.nix Normal file
View File

@@ -0,0 +1,6 @@
{
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs = { nixpkgs, ... }@inputs: {
packages."x86_64-linux".default = nixpkgs.legacyPackages.x86_64-linux.callPackage ./padtype.nix {};
};
}

31
padtype.nix Normal file
View File

@@ -0,0 +1,31 @@
{ lib
, pkg-config
, libudev-zero
, fetchFromGitHub
, rustPlatform
}:
rustPlatform.buildRustPackage rec {
pname = "padtype";
version = "0.1.0";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libudev-zero ];
src = fetchFromGitHub {
owner = "shelvacu";
repo = pname;
rev = "8c2f4dd88763efe86ab681d1e2da9a1fd14e38eb";
hash = "sha256-ieXhSjO17IsdZNXov1BHtbsE6Zgl9+5ZFSs6/H1+pXI=";
};
cargoHash = "sha256-ZVODenwAbCP9+gl9sF/s/6sa79lG2d88E4HdfxKf35o=";
meta = with lib; {
description = "ill put this in later";
homepage = "https://github.com/shelvacu/padtype";
license = licenses.unlicense;
maintainers = [];
};
}