From a9024dde9cead2ee44dcb4f6832e56928815927f Mon Sep 17 00:00:00 2001 From: mat ess Date: Mon, 15 Aug 2022 21:42:40 -0400 Subject: [PATCH] Initial commit --- .envrc | 1 + .gitignore | 3 + Cargo.lock | 7 ++ Cargo.toml | 8 +++ flake.lock | 193 ++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 33 +++++++++ src/main.rs | 3 + 7 files changed, 248 insertions(+) create mode 100644 .envrc create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 flake.lock create mode 100644 flake.nix create mode 100644 src/main.rs diff --git a/.envrc b/.envrc new file mode 100644 index 0000000..3550a30 --- /dev/null +++ b/.envrc @@ -0,0 +1 @@ +use flake diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0a44818 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/target +/result +/.direnv \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..12175bb --- /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 = "medit" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..d28ef6b --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "medit" +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..f3cd91e --- /dev/null +++ b/flake.lock @@ -0,0 +1,193 @@ +{ + "nodes": { + "crane": { + "flake": false, + "locked": { + "lastModified": 1654444508, + "narHash": "sha256-4OBvQ4V7jyt7afs6iKUvRzJ1u/9eYnKzVQbeQdiamuY=", + "owner": "ipetkov", + "repo": "crane", + "rev": "db5482bf225acc3160899124a1df5a617cfa27b5", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "devshell": { + "flake": false, + "locked": { + "lastModified": 1658746384, + "narHash": "sha256-CCJcoMOcXyZFrV1ag4XMTpAPjLWb4Anbv+ktXFI1ry0=", + "owner": "numtide", + "repo": "devshell", + "rev": "0ffc7937bb5e8141af03d462b468bd071eb18e1b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "devshell", + "type": "github" + } + }, + "dream2nix": { + "inputs": { + "alejandra": [ + "nci", + "nixpkgs" + ], + "crane": "crane", + "devshell": [ + "nci", + "devshell" + ], + "flake-utils-pre-commit": [ + "nci", + "nixpkgs" + ], + "gomod2nix": [ + "nci", + "nixpkgs" + ], + "mach-nix": [ + "nci", + "nixpkgs" + ], + "nixpkgs": [ + "nci", + "nixpkgs" + ], + "poetry2nix": [ + "nci", + "nixpkgs" + ], + "pre-commit-hooks": [ + "nci", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660322711, + "narHash": "sha256-Q7im8L9UEVs448V4dv4XdCZy5yFfO1J+KpBi8O9Fe4o=", + "owner": "nix-community", + "repo": "dream2nix", + "rev": "9331fb1376068e24f0ab5080aec85f43a369ebdb", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "dream2nix", + "type": "github" + } + }, + "flake-parts": { + "inputs": { + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1657102481, + "narHash": "sha256-62Fuw8JgPub38OdgNefkIKOodM9nC3M0AG6lS+7smf4=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "608ed3502263d6f4f886d75c48fc2b444a4ab8d8", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "flake-utils": { + "locked": { + "lastModified": 1656928814, + "narHash": "sha256-RIFfgBuKz6Hp89yRr7+NR5tzIAbn52h8vT6vXkYjZoM=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "7e2a3b3dfd9af950a856d66b0a7d01e3c18aa249", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nci": { + "inputs": { + "devshell": "devshell", + "dream2nix": "dream2nix", + "nixpkgs": [ + "nixpkgs" + ], + "rust-overlay": [ + "rust" + ] + }, + "locked": { + "lastModified": 1660543949, + "narHash": "sha256-dnKsU4qMXzbOaWRFQ9W2f5gOCXMtqo2ZRSugdNs/80s=", + "owner": "yusdacra", + "repo": "nix-cargo-integration", + "rev": "670586d5d3a2a786fa2adfc4273b4419206c1e78", + "type": "github" + }, + "original": { + "owner": "yusdacra", + "repo": "nix-cargo-integration", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1660396586, + "narHash": "sha256-ePuWn7z/J5p2lO7YokOG1o01M0pDDVL3VrStaPpS5Ig=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "e105167e98817ba9fe079c6c3c544c6ef188e276", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-parts": "flake-parts", + "nci": "nci", + "nixpkgs": "nixpkgs", + "rust": "rust" + } + }, + "rust": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1660445476, + "narHash": "sha256-zVYSeFg1vwY2S0HQjk16JBrHhjau7FgSnY903G9wFtk=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "911a6600b6c099204cea817e59291a943705831e", + "type": "github" + }, + "original": { + "owner": "oxalica", + "repo": "rust-overlay", + "type": "github" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..8d0cee5 --- /dev/null +++ b/flake.nix @@ -0,0 +1,33 @@ +{ + description = "Description for the project"; + + inputs = { + nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; + flake-parts.url = "github:hercules-ci/flake-parts"; + flake-parts.inputs.nixpkgs.follows = "nixpkgs"; + + rust.url = "github:oxalica/rust-overlay"; + rust.inputs.nixpkgs.follows = "nixpkgs"; + + nci.url = "github:yusdacra/nix-cargo-integration"; + nci.inputs.nixpkgs.follows = "nixpkgs"; + nci.inputs.rust-overlay.follows = "rust"; + }; + + outputs = { self, flake-parts, ... }@inputs: + flake-parts.lib.mkFlake { inherit self; } { + imports = [{ + config.perSystem = { system, ... }: { + config._module.args.pkgs = (import inputs.nixpkgs { + inherit system; + overlays = [ inputs.rust.overlays.default ]; + }); + }; + }]; + systems = inputs.nixpkgs.lib.systems.flakeExposed; + perSystem = { config, self', inputs', pkgs, system, ... }: { }; + flake = inputs.nci.lib.makeOutputs { + root = ./.; + }; + }; +} 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!"); +}