Compare commits
6 commits
50be0ff152
...
5975673b00
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 5975673b00 | ||
Bruno BELANYI | 8a4fdf6a56 | ||
Bruno BELANYI | d97da124ee | ||
Bruno BELANYI | 96aa934bec | ||
Bruno BELANYI | 4b5a19a8fa | ||
Bruno BELANYI | 06c64c1a78 |
|
@ -9,15 +9,15 @@ steps:
|
||||||
|
|
||||||
- name: notifiy
|
- name: notifiy
|
||||||
image: bash
|
image: bash
|
||||||
secrets:
|
environment:
|
||||||
- source: matrix_homeserver
|
ADDRESS:
|
||||||
target: address
|
from_secret: matrix_homeserver
|
||||||
- source: matrix_roomid
|
ROOM:
|
||||||
target: room
|
from_secret: matrix_roomid
|
||||||
- source: matrix_username
|
USER:
|
||||||
target: user
|
from_secret: matrix_username
|
||||||
- source: matrix_password
|
PASS:
|
||||||
target: pass
|
from_secret: matrix_password
|
||||||
commands:
|
commands:
|
||||||
- nix run '.#matrix-notifier'
|
- nix run '.#matrix-notifier'
|
||||||
when:
|
when:
|
||||||
|
|
|
@ -26,7 +26,7 @@ stdenvNoCC.mkDerivation rec {
|
||||||
description = ''
|
description = ''
|
||||||
A zsh plug-in to receive notifications when long processes finish
|
A zsh plug-in to receive notifications when long processes finish
|
||||||
'';
|
'';
|
||||||
homepage = "https://gitea.belanyi.fr/ambroisie/zsh-done";
|
homepage = "https://git.belanyi.fr/ambroisie/zsh-done";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
maintainers = with maintainers; [ ambroisie ];
|
maintainers = with maintainers; [ ambroisie ];
|
||||||
|
|
|
@ -14,17 +14,17 @@ steps:
|
||||||
|
|
||||||
- name: notifiy
|
- name: notifiy
|
||||||
image: bash
|
image: bash
|
||||||
secrets:
|
environment:
|
||||||
- source: matrix_homeserver
|
ADDRESS:
|
||||||
target: address
|
from_secret: matrix_homeserver
|
||||||
- source: matrix_roomid
|
ROOM:
|
||||||
target: room
|
from_secret: matrix_roomid
|
||||||
- source: matrix_username
|
USER:
|
||||||
target: user
|
from_secret: matrix_username
|
||||||
- source: matrix_password
|
PASS:
|
||||||
target: pass
|
from_secret: matrix_password
|
||||||
commands:
|
commands:
|
||||||
- nix run '.#matrix-notifier'
|
- nix run github:ambroisie/matrix-notifier
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- failure
|
- failure
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A C++ project";
|
description = "A C++ project";
|
||||||
homepage = "https://gitea.belanyi.fr/ambroisie/project";
|
homepage = "https://git.belanyi.fr/ambroisie/project";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ ambroisie ];
|
maintainers = with maintainers; [ ambroisie ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
|
@ -14,17 +14,17 @@ steps:
|
||||||
|
|
||||||
- name: notifiy
|
- name: notifiy
|
||||||
image: bash
|
image: bash
|
||||||
secrets:
|
environment:
|
||||||
- source: matrix_homeserver
|
ADDRESS:
|
||||||
target: address
|
from_secret: matrix_homeserver
|
||||||
- source: matrix_roomid
|
ROOM:
|
||||||
target: room
|
from_secret: matrix_roomid
|
||||||
- source: matrix_username
|
USER:
|
||||||
target: user
|
from_secret: matrix_username
|
||||||
- source: matrix_password
|
PASS:
|
||||||
target: pass
|
from_secret: matrix_password
|
||||||
commands:
|
commands:
|
||||||
- nix run '.#matrix-notifier'
|
- nix run github:ambroisie/matrix-notifier
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- failure
|
- failure
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A C++ project";
|
description = "A C++ project";
|
||||||
homepage = "https://gitea.belanyi.fr/ambroisie/project";
|
homepage = "https://git.belanyi.fr/ambroisie/project";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ ambroisie ];
|
maintainers = with maintainers; [ ambroisie ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
|
|
@ -5,6 +5,10 @@
|
||||||
};
|
};
|
||||||
"c++-meson" = {
|
"c++-meson" = {
|
||||||
path = ./c++-meson;
|
path = ./c++-meson;
|
||||||
description = "A C++ project using CMake";
|
description = "A C++ project using Meson";
|
||||||
|
};
|
||||||
|
"rust-cargo" = {
|
||||||
|
path = ./rust-cargo;
|
||||||
|
description = "A Rust project using Cargo";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
5
templates/rust-cargo/.envrc
Normal file
5
templates/rust-cargo/.envrc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
if ! has nix_direnv_version || ! nix_direnv_version 3.0.0; then
|
||||||
|
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.0/direnvrc" "sha256-21TMnI2xWX7HkSTjFFri2UaohXVj854mgvWapWrxRXg="
|
||||||
|
fi
|
||||||
|
|
||||||
|
use flake
|
6
templates/rust-cargo/.gitignore
vendored
Normal file
6
templates/rust-cargo/.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Rust build directory
|
||||||
|
/target
|
||||||
|
|
||||||
|
# Nix generated files
|
||||||
|
/.pre-commit-config.yaml
|
||||||
|
/result
|
31
templates/rust-cargo/.woodpecker/check.yml
Normal file
31
templates/rust-cargo/.woodpecker/check.yml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
labels:
|
||||||
|
backend: local
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: pre-commit check
|
||||||
|
image: bash
|
||||||
|
commands:
|
||||||
|
- nix develop --command pre-commit run --all
|
||||||
|
|
||||||
|
- name: nix flake check
|
||||||
|
image: bash
|
||||||
|
commands:
|
||||||
|
- nix flake check
|
||||||
|
|
||||||
|
- name: notifiy
|
||||||
|
image: bash
|
||||||
|
environment:
|
||||||
|
ADDRESS:
|
||||||
|
from_secret: matrix_homeserver
|
||||||
|
ROOM:
|
||||||
|
from_secret: matrix_roomid
|
||||||
|
USER:
|
||||||
|
from_secret: matrix_username
|
||||||
|
PASS:
|
||||||
|
from_secret: matrix_password
|
||||||
|
commands:
|
||||||
|
- nix run github:ambroisie/matrix-notifier
|
||||||
|
when:
|
||||||
|
status:
|
||||||
|
- failure
|
||||||
|
- success
|
7
templates/rust-cargo/Cargo.lock
generated
Normal file
7
templates/rust-cargo/Cargo.lock
generated
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# This file is automatically @generated by Cargo.
|
||||||
|
# It is not intended for manual editing.
|
||||||
|
version = 3
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "project"
|
||||||
|
version = "0.0.0"
|
8
templates/rust-cargo/Cargo.toml
Normal file
8
templates/rust-cargo/Cargo.toml
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
[package]
|
||||||
|
name = "project"
|
||||||
|
version = "0.0.0"
|
||||||
|
edition = "2021"
|
||||||
|
|
||||||
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
|
[dependencies]
|
112
templates/rust-cargo/flake.nix
Normal file
112
templates/rust-cargo/flake.nix
Normal file
|
@ -0,0 +1,112 @@
|
||||||
|
{
|
||||||
|
description = "A Rust project";
|
||||||
|
|
||||||
|
inputs = {
|
||||||
|
futils = {
|
||||||
|
type = "github";
|
||||||
|
owner = "numtide";
|
||||||
|
repo = "flake-utils";
|
||||||
|
ref = "main";
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs = {
|
||||||
|
type = "github";
|
||||||
|
owner = "NixOS";
|
||||||
|
repo = "nixpkgs";
|
||||||
|
ref = "nixos-unstable";
|
||||||
|
};
|
||||||
|
|
||||||
|
pre-commit-hooks = {
|
||||||
|
type = "github";
|
||||||
|
owner = "cachix";
|
||||||
|
repo = "pre-commit-hooks.nix";
|
||||||
|
ref = "master";
|
||||||
|
inputs = {
|
||||||
|
flake-utils.follows = "futils";
|
||||||
|
nixpkgs.follows = "nixpkgs";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs = { self, futils, nixpkgs, pre-commit-hooks }:
|
||||||
|
{
|
||||||
|
overlays = {
|
||||||
|
default = final: _prev: {
|
||||||
|
project = with final; rustPlatform.buildRustPackage {
|
||||||
|
pname = "project";
|
||||||
|
version = (final.lib.importTOML ./Cargo.toml).package.version;
|
||||||
|
|
||||||
|
src = self;
|
||||||
|
|
||||||
|
cargoLock = {
|
||||||
|
lockFile = "${self}/Cargo.lock";
|
||||||
|
};
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A Rust project";
|
||||||
|
homepage = "https://git.belanyi.fr/ambroisie/project";
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ ambroisie ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
} // futils.lib.eachDefaultSystem (system:
|
||||||
|
let
|
||||||
|
pkgs = import nixpkgs {
|
||||||
|
inherit system;
|
||||||
|
overlays = [
|
||||||
|
self.overlays.default
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
pre-commit = pre-commit-hooks.lib.${system}.run {
|
||||||
|
src = self;
|
||||||
|
|
||||||
|
hooks = {
|
||||||
|
clippy = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
denyWarnings = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
nixpkgs-fmt = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
rustfmt = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
checks = {
|
||||||
|
inherit (self.packages.${system}) project;
|
||||||
|
};
|
||||||
|
|
||||||
|
devShells = {
|
||||||
|
default = pkgs.mkShell {
|
||||||
|
inputsFrom = with self.packages.${system}; [
|
||||||
|
project
|
||||||
|
];
|
||||||
|
|
||||||
|
packages = with pkgs; [
|
||||||
|
clippy
|
||||||
|
rust-analyzer
|
||||||
|
rustfmt
|
||||||
|
];
|
||||||
|
|
||||||
|
RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}";
|
||||||
|
|
||||||
|
inherit (pre-commit) shellHook;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
packages = futils.lib.flattenTree {
|
||||||
|
default = pkgs.project;
|
||||||
|
inherit (pkgs) project;
|
||||||
|
};
|
||||||
|
});
|
||||||
|
}
|
3
templates/rust-cargo/src/main.rs
Normal file
3
templates/rust-cargo/src/main.rs
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
fn main() {
|
||||||
|
println!("Hello, world!");
|
||||||
|
}
|
Loading…
Reference in a new issue