feat: initial commit

This commit is contained in:
uku 2025-05-08 17:32:55 +02:00
commit 995cd7079b
Signed by: uku
SSH key fingerprint: SHA256:4P0aN6M8ajKukNi6aPOaX0LacanGYtlfjmN+m/sHY/o
8 changed files with 134 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

3
.gitignore vendored Normal file
View file

@ -0,0 +1,3 @@
/target
.direnv/
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 = 4
[[package]]
name = "tyrolienne"
version = "0.1.0"

6
Cargo.toml Normal file
View file

@ -0,0 +1,6 @@
[package]
name = "tyrolienne"
version = "0.1.0"
edition = "2024"
[dependencies]

48
flake.lock generated Normal file
View file

@ -0,0 +1,48 @@
{
"nodes": {
"flake-parts": {
"inputs": {
"nixpkgs-lib": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1743550720,
"narHash": "sha256-hIshGgKZCgWh6AYJpJmRgFdR3WUbkY04o82X05xqQiY=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "c621e8422220273271f52058f618c94e405bb0f5",
"type": "github"
},
"original": {
"owner": "hercules-ci",
"repo": "flake-parts",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1746461020,
"narHash": "sha256-7+pG1I9jvxNlmln4YgnlW4o+w0TZX24k688mibiFDUE=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "3730d8a308f94996a9ba7c7138ede69c1b9ac4ae",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"flake-parts": "flake-parts",
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

34
flake.nix Normal file
View file

@ -0,0 +1,34 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs?ref=nixos-unstable";
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
};
outputs =
{ self, flake-parts, ... }@inputs:
flake-parts.lib.mkFlake { inherit inputs; } {
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
perSystem =
{ self', pkgs, ... }:
{
packages = {
tyrolienne = pkgs.callPackage ./package.nix { inherit self; };
default = self'.packages.tyrolienne;
};
devShells.default = pkgs.mkShell {
inputsFrom = [ self'.packages.default ];
};
};
};
}

32
package.nix Normal file
View file

@ -0,0 +1,32 @@
{
lib,
rustPlatform,
mold-wrapped,
self,
}:
let
cargoToml = lib.importTOML ./Cargo.toml;
rev = self.shortRev or self.dirtyShortRev or "dirty";
in
rustPlatform.buildRustPackage {
pname = cargoToml.package.name;
version = "${cargoToml.package.version}+git.${rev}";
src = self;
nativeBuildInputs = [ mold-wrapped ];
cargoLock.lockFile = ./Cargo.lock;
RUSTFLAGS = "-C link-arg=-fuse-ld=mold";
doCheck = false;
meta = with lib; {
mainProgram = cargoToml.package.name;
description = "simple tool to convert, upload, and embed videos to zipline";
homepage = "https://git.uku3lig.net/uku/tyrolienne";
license = licenses.mpl20;
platforms = platforms.unix;
};
}

3
src/main.rs Normal file
View file

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