chore: remove nix files due to lack of maintenance
This commit is contained in:
58
flake.lock
generated
58
flake.lock
generated
@@ -1,58 +0,0 @@
|
|||||||
{
|
|
||||||
"nodes": {
|
|
||||||
"flake-utils": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1648297722,
|
|
||||||
"narHash": "sha256-W+qlPsiZd8F3XkzXOzAoR+mpFqzm3ekQkJNa+PIh1BQ=",
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"rev": "0f8662f1319ad6abf89b3380dd2722369fc51ade",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "numtide",
|
|
||||||
"repo": "flake-utils",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"import-cargo": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1594305518,
|
|
||||||
"narHash": "sha256-frtArgN42rSaEcEOYWg8sVPMUK+Zgch3c+wejcpX3DY=",
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "import-cargo",
|
|
||||||
"rev": "25d40be4a73d40a2572e0cc233b83253554f06c5",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "edolstra",
|
|
||||||
"repo": "import-cargo",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"nixpkgs": {
|
|
||||||
"locked": {
|
|
||||||
"lastModified": 1649352661,
|
|
||||||
"narHash": "sha256-6IO5W02HKY6pj4uRgStJ2EjIENlpvbb99OlDBBzJMDQ=",
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"rev": "2bc410afc423de1fd7ce1d84da9f294eee866b3f",
|
|
||||||
"type": "github"
|
|
||||||
},
|
|
||||||
"original": {
|
|
||||||
"owner": "NixOS",
|
|
||||||
"repo": "nixpkgs",
|
|
||||||
"type": "github"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": {
|
|
||||||
"inputs": {
|
|
||||||
"flake-utils": "flake-utils",
|
|
||||||
"import-cargo": "import-cargo",
|
|
||||||
"nixpkgs": "nixpkgs"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"root": "root",
|
|
||||||
"version": 7
|
|
||||||
}
|
|
||||||
63
flake.nix
63
flake.nix
@@ -1,63 +0,0 @@
|
|||||||
{
|
|
||||||
description = "Converts audio files";
|
|
||||||
|
|
||||||
inputs = {
|
|
||||||
nixpkgs.url = github:NixOS/nixpkgs;
|
|
||||||
flake-utils.url = "github:numtide/flake-utils";
|
|
||||||
import-cargo.url = github:edolstra/import-cargo;
|
|
||||||
};
|
|
||||||
|
|
||||||
outputs = { self, flake-utils, nixpkgs, import-cargo }:
|
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
|
||||||
let
|
|
||||||
pkgs = import nixpkgs { inherit system; };
|
|
||||||
|
|
||||||
buildtimeDeps = with pkgs; [
|
|
||||||
cargo
|
|
||||||
rustc
|
|
||||||
pkg-config
|
|
||||||
];
|
|
||||||
|
|
||||||
runtimeDeps = with pkgs; [
|
|
||||||
gst_all_1.gstreamer
|
|
||||||
|
|
||||||
# needed for opus, resample, ...
|
|
||||||
gst_all_1.gst-plugins-base
|
|
||||||
|
|
||||||
# needed for flac
|
|
||||||
gst_all_1.gst-plugins-good
|
|
||||||
];
|
|
||||||
|
|
||||||
inherit (import-cargo.builders) importCargo;
|
|
||||||
in {
|
|
||||||
defaultPackage = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "audio-conv";
|
|
||||||
src = self;
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
|
||||||
# setupHook which makes sure that a CARGO_HOME with vendored dependencies
|
|
||||||
# exists
|
|
||||||
(importCargo { lockFile = ./Cargo.lock; inherit pkgs; }).cargoHome
|
|
||||||
]
|
|
||||||
++ buildtimeDeps;
|
|
||||||
|
|
||||||
buildInputs = runtimeDeps;
|
|
||||||
|
|
||||||
buildPhase = ''
|
|
||||||
cargo build --release --offline
|
|
||||||
'';
|
|
||||||
|
|
||||||
installPhase = ''
|
|
||||||
install -Dm775 ./target/release/audio-conv $out/bin/audio-conv
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
devShell = pkgs.stdenv.mkDerivation {
|
|
||||||
name = "audio-conv";
|
|
||||||
buildInputs = [ pkgs.rustfmt pkgs.rust-analyzer ]
|
|
||||||
++ buildtimeDeps
|
|
||||||
++ runtimeDeps;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user