upd
This commit is contained in:
parent
17fc2e6d23
commit
894a69222c
27
flake.lock
Normal file
27
flake.lock
Normal file
|
@ -0,0 +1,27 @@
|
|||
{
|
||||
"nodes": {
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1707092692,
|
||||
"narHash": "sha256-ZbHsm+mGk/izkWtT4xwwqz38fdlwu7nUUKXTOmm4SyE=",
|
||||
"owner": "nixos",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "faf912b086576fd1a15fca610166c98d47bc667e",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "nixos",
|
||||
"ref": "nixos-unstable",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
17
flake.nix
17
flake.nix
|
@ -5,23 +5,24 @@
|
|||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||
};
|
||||
|
||||
outputs = { self, nixpkgs, stdenv } @inputs:
|
||||
outputs = { self, nixpkgs } @inputs:
|
||||
let
|
||||
system = "x86_64-linux";
|
||||
pkgs = nixpkgs.legacyPackages.${system};
|
||||
lib = pkgs.lib;
|
||||
lib = nixpkgs.lib;
|
||||
in {
|
||||
packages.${system}.default = {
|
||||
packages.${system}.default = pkgs.stdenv.mkDerivation rec {
|
||||
pname = "Sample Package";
|
||||
version = "1.0";
|
||||
|
||||
# Fetch sources.
|
||||
src = fetchGit {
|
||||
url = "https://git.voronind.com/voronind/nixos_sample_package.git";
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://git.voronind.com/voronind/nixos_sample_package/archive/v1.tar.gz";
|
||||
hash = "sha256-zAXcCiRqOgMBChqabFjCmAaux1Yb9N+Y5jcE22zT3OI=";
|
||||
};
|
||||
|
||||
# Bins go here.
|
||||
nativeBuildInputs = [
|
||||
nativeBuildInputs = with pkgs; [
|
||||
cargo
|
||||
rustc
|
||||
];
|
||||
|
@ -36,8 +37,8 @@
|
|||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p ${out}/bin
|
||||
cp target/release/nixos_sample_package ${out}/bin
|
||||
mkdir -p $out/bin
|
||||
cp target/release/nixos_sample_package $out/bin
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue