mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-17 16:29:50 +00:00
nix: init tooling
This commit is contained in:
parent
b7672a306b
commit
b78133a5c4
5 changed files with 89 additions and 0 deletions
1
.envrc
Normal file
1
.envrc
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
use flake
|
||||||
26
flake.lock
generated
Normal file
26
flake.lock
generated
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1734880952,
|
||||||
|
"narHash": "sha256-ZTt3x0DN55JGjdYv8TEDC/YDxcYfpFDLApYvKFMnxNM=",
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "578baae41df4920fb34db92ae3a312c23ea90b89",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "NixOS",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"nixpkgs": "nixpkgs"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
||||||
23
flake.nix
Normal file
23
flake.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
|
||||||
|
|
||||||
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
}: let
|
||||||
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
|
forEachSystem = nixpkgs.lib.genAttrs systems;
|
||||||
|
|
||||||
|
pkgsForEach = nixpkgs.legacyPackages;
|
||||||
|
in rec {
|
||||||
|
packages = forEachSystem (system: {
|
||||||
|
default = pkgsForEach.${system}.callPackage ./nix/package.nix {};
|
||||||
|
});
|
||||||
|
|
||||||
|
devShells = forEachSystem (system: {
|
||||||
|
default = pkgsForEach.${system}.callPackage ./nix/shell.nix {};
|
||||||
|
});
|
||||||
|
|
||||||
|
hydraJobs = packages;
|
||||||
|
};
|
||||||
|
}
|
||||||
12
nix/package.nix
Normal file
12
nix/package.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{rustPlatform}:
|
||||||
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
|
pname = "mrc";
|
||||||
|
version = "0.0.1";
|
||||||
|
src = ./.;
|
||||||
|
|
||||||
|
cargoLock.lockFile = finalAttrs.src + /Cargo.lock;
|
||||||
|
meta = {
|
||||||
|
description = "MPV IPC wrapper";
|
||||||
|
mainProgram = "mrc";
|
||||||
|
};
|
||||||
|
})
|
||||||
27
nix/shell.nix
Normal file
27
nix/shell.nix
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
mkShell,
|
||||||
|
rust-analyzer,
|
||||||
|
rustfmt,
|
||||||
|
clippy,
|
||||||
|
cargo,
|
||||||
|
gcc,
|
||||||
|
openssl,
|
||||||
|
pkg-config,
|
||||||
|
rustc,
|
||||||
|
}:
|
||||||
|
mkShell {
|
||||||
|
name = "mrc";
|
||||||
|
packages = [
|
||||||
|
rust-analyzer
|
||||||
|
rustfmt
|
||||||
|
clippy
|
||||||
|
cargo
|
||||||
|
cargo
|
||||||
|
gcc
|
||||||
|
clippy
|
||||||
|
rustfmt
|
||||||
|
openssl
|
||||||
|
pkg-config
|
||||||
|
rustc
|
||||||
|
];
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue