commit 7a21618a54bd72bedf8c35c32fd0f2b0b1ff261f Author: asonix Date: Thu Jul 20 20:27:45 2023 -0500 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1cbd80d --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/target +/.direnv +/.envrc diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..813c970 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,7 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "pict-rs-integration-tests" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..fefb1a5 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "pict-rs-integration-tests" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..fc0942e --- /dev/null +++ b/flake.lock @@ -0,0 +1,61 @@ +{ + "nodes": { + "flake-utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1689068808, + "narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1689679375, + "narHash": "sha256-LHUC52WvyVDi9PwyL1QCpaxYWBqp4ir4iL6zgOkmcb8=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "684c17c429c42515bafb3ad775d2a710947f3d67", + "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 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..623f91b --- /dev/null +++ b/flake.nix @@ -0,0 +1,34 @@ +{ + description = "pict-rs-integration-tests"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-utils.url = "github:numtide/flake-utils"; + }; + + outputs = { self, nixpkgs, flake-utils }: + flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + }; + in + { + packages = rec { + pict-rs-integration-tests = pkgs.callPackage ./pict-rs-integration-tests.nix { }; + + default = pict-rs-integration-tests; + }; + + apps = rec { + dev = flake-utils.lib.mkApp { drv = self.packages.${system}.pict-rs-integration-tests; }; + default = dev; + }; + + devShell = with pkgs; mkShell { + nativeBuildInputs = [ cargo cargo-outdated clippy gcc rust-analyzer rustc rustfmt ]; + + RUST_SRC_PATH = "${pkgs.rust.packages.stable.rustPlatform.rustLibSrc}"; + }; + }); +} diff --git a/pict-rs-integration-tests.nix b/pict-rs-integration-tests.nix new file mode 100644 index 0000000..cafb0eb --- /dev/null +++ b/pict-rs-integration-tests.nix @@ -0,0 +1,21 @@ +{ lib +, nixosTests +, rustPlatform +}: + +rustPlatform.buildRustPackage { + pname = "pict-rs-integration-tests"; + version = "0.1.0"; + src = ./.; + cargoLock.lockFile = ./Cargo.lock; + + nativeBuildInputs = [ ]; + + passthru.tests = { inherit (nixosTests) pict-rs-integration-tests; }; + + meta = with lib; { + description = "A simple image hosting service"; + homepage = "https://git.asonix.dog/asonix/pict-rs-integration-tests"; + license = with licenses; [ agpl3Plus ]; + }; +} diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +}