Add basic nix package
This commit is contained in:
parent
42406483ac
commit
5be313863e
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
/target
|
||||
/.direnv
|
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1731245184,
|
||||
"narHash": "sha256-vmLS8+x+gHRv1yzj3n+GTAEObwmhxmkkukB2DwtJRdU=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "aebe249544837ce42588aa4b2e7972222ba12e8f",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixpkgs-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
33
flake.nix
Normal file
33
flake.nix
Normal file
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
inputs = {
|
||||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs }:
|
||||
let pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
||||
inherit (pkgs) lib;
|
||||
system = "x86_64-linux";
|
||||
in rec {
|
||||
formatter."${system}" = pkgs.nixfmt-rfc-style;
|
||||
devShells."${system}".default = pkgs.mkShell {
|
||||
packages = [
|
||||
pkgs.mkvtoolnix-cli
|
||||
];
|
||||
};
|
||||
|
||||
overlays.default = final: prev: {
|
||||
subtitle-merge = final.rustPlatform.buildRustPackage {
|
||||
name = "subtitle-merge";
|
||||
version = "1.0";
|
||||
src = ./.;
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
buildInputs = [ final.mkvtoolnix-cli ];
|
||||
};
|
||||
};
|
||||
|
||||
packages."${system}" = rec {
|
||||
subtitle-merge = (overlays.default pkgs pkgs).subtitle-merge;
|
||||
default = subtitle-merge;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue