Project boilerplate

This commit is contained in:
Félix Baylac Jacqué 2022-12-19 20:02:47 +01:00
commit 90267bd9a3
9 changed files with 90 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
/target
result

7
Cargo.lock generated Normal file
View File

@ -0,0 +1,7 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 3
[[package]]
name = "nix-cache-bucket-gc"
version = "0.1.0"

8
Cargo.toml Normal file
View File

@ -0,0 +1,8 @@
[package]
name = "nix-cache-bucket-gc"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Nom Nom Nix GC
Nom-noms buckets of your yummy Nix cache.

8
default.nix Normal file
View File

@ -0,0 +1,8 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.rustPlatform.buildRustPackage {
pname = "nom-nom-nix-gc";
version = "0.0";
src = pkgs.lib.cleanSource ./.;
cargoHash = "sha256-yTbzY1PGxwevQ07LRSqIj/yzukxFOI427Yc6eE0KZc8=";
}

27
flake.lock Normal file
View File

@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1671417167,
"narHash": "sha256-JkHam6WQOwZN1t2C2sbp1TqMv3TVRjzrdoejqfefwrM=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "bb31220cca6d044baa6dc2715b07497a2a7c4bc7",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixpkgs-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

24
flake.nix Normal file
View File

@ -0,0 +1,24 @@
{
description = "Nom Nom Nix GC";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
outputs = { self, nixpkgs }:
let
systems = [
"x86_64-linux"
"aarch64-linux"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
pkgs = system: import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in {
defaultPackage = forAllSystems (system: import ./. { pkgs = nixpkgs.legacyPackages.${system}; });
devShell = forAllSystems (system: nixpkgs.legacyPackages.${system}.callPackage ./shell.nix { });
formatter = forAllSystems (system:
nixpkgs.legacyPackages.${system}.nixpkgs-fmt
);
};
}

8
shell.nix Normal file
View File

@ -0,0 +1,8 @@
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
nativeBuildInputs = [
pkgs.rustc
pkgs.cargo
];
}

3
src/main.rs Normal file
View File

@ -0,0 +1,3 @@
fn main() {
println!("Hello, world!");
}