podlet flake

This commit is contained in:
Daniel Yrovas 2024-05-07 11:54:12 +10:00
commit 3f9962d2e3
3 changed files with 99 additions and 0 deletions

16
default.nix Normal file
View file

@ -0,0 +1,16 @@
{
pkgs ? import <nixpkgs> {},
fetchFromGitHub,
}:
pkgs.rustPlatform.buildRustPackage rec {
pname = "podlet";
version = "0.2.4";
cargoHash = "sha256-3plmxaCgZj0kbimws36aRKenfhWq6aKmHUWX0ZoefJI=";
src = fetchFromGitHub {
owner = "containers";
repo = pname;
rev = version;
hash = "sha256-cCSVNwJZNePlM4Nzj7VVka51WQuUCNlwsMLk767Fg3Y=";
};
}

61
flake.lock generated Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"flake-utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1710146030,
"narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1714906307,
"narHash": "sha256-UlRZtrCnhPFSJlDQE7M0eyhgvuuHBTe1eJ9N9AQlJQ0=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "25865a40d14b3f9cf19f19b924e2ab4069b09588",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

22
flake.nix Normal file
View file

@ -0,0 +1,22 @@
{
description = "Podlet";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = {
self,
nixpkgs,
flake-utils,
}:
flake-utils.lib.eachDefaultSystem (system: let
pkgs = nixpkgs.legacyPackages.${system};
# packageName = "podlet";
in {
defaultPackage = pkgs.callPackage ./default.nix {};
# defaultPackage = self.packages.${system}.${packageName};
devShell = pkgs.mkShell {buildInputs = [];};
});
}