mirror of
https://github.com/NotAShelf/mpvrc.git
synced 2026-04-17 08:19:51 +00:00
nix: fix build
This commit is contained in:
parent
eb2dc61c70
commit
8066de2848
2 changed files with 27 additions and 6 deletions
11
flake.nix
11
flake.nix
|
|
@ -1,14 +1,19 @@
|
||||||
{
|
{
|
||||||
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
|
||||||
|
|
||||||
outputs = {nixpkgs, ...}: let
|
outputs = {
|
||||||
|
self,
|
||||||
|
nixpkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
systems = ["x86_64-linux" "aarch64-linux"];
|
systems = ["x86_64-linux" "aarch64-linux"];
|
||||||
forEachSystem = nixpkgs.lib.genAttrs systems;
|
forEachSystem = nixpkgs.lib.genAttrs systems;
|
||||||
|
|
||||||
pkgsForEach = nixpkgs.legacyPackages;
|
pkgsForEach = nixpkgs.legacyPackages;
|
||||||
in rec {
|
in rec {
|
||||||
packages = forEachSystem (system: {
|
packages = forEachSystem (system: {
|
||||||
default = pkgsForEach.${system}.callPackage ./nix/package.nix {};
|
mrc = pkgsForEach.${system}.callPackage ./nix/package.nix {};
|
||||||
|
default = self.packages.${system}.mrc;
|
||||||
});
|
});
|
||||||
|
|
||||||
devShells = forEachSystem (system: {
|
devShells = forEachSystem (system: {
|
||||||
|
|
|
||||||
|
|
@ -1,13 +1,16 @@
|
||||||
{
|
{
|
||||||
lib,
|
lib,
|
||||||
rustPlatform,
|
rustPlatform,
|
||||||
|
pkg-config,
|
||||||
|
openssl,
|
||||||
}: let
|
}: let
|
||||||
fs = lib.fileset;
|
fs = lib.fileset;
|
||||||
s = ../.;
|
s = ../.;
|
||||||
in
|
in
|
||||||
rustPlatform.buildRustPackage (finalAttrs: {
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
pname = "mrc";
|
pname = "mrc";
|
||||||
version = "0.1.0";
|
version = (builtins.fromTOML (builtins.readFile (s + /Cargo.toml))).package.version;
|
||||||
|
|
||||||
src = fs.toSource {
|
src = fs.toSource {
|
||||||
root = s;
|
root = s;
|
||||||
fileset = fs.unions [
|
fileset = fs.unions [
|
||||||
|
|
@ -17,10 +20,23 @@ in
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoLock.lockFile = finalAttrs.src + /Cargo.lock;
|
strictDeps = true;
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
pkg-config
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
openssl
|
||||||
|
];
|
||||||
|
|
||||||
|
cargoLock.lockFile = "${finalAttrs.src}/Cargo.lock";
|
||||||
|
useFetchCargoVendor = true;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "IPC wrapper & command-line controller for MPV, the video player";
|
description = "IPC wrapper & command-line controller for MPV, the video player";
|
||||||
|
homePage = "https://github.com/notashelf/mrc";
|
||||||
mainProgram = "mrc";
|
mainProgram = "mrc";
|
||||||
license = lib.licenses.mpl20;
|
license = lib.licenses.mpl20;
|
||||||
maintainers = [lib.maintainers.NotAShelf];
|
maintainers = [lib.maintainers.NotAShelf];
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue