From 21d6d15a718ab6e1237415d856d408be0d26f69b Mon Sep 17 00:00:00 2001 From: Yusuf Bera Ertan Date: Tue, 18 Apr 2023 00:08:04 +0300 Subject: [PATCH] chore: init --- .envrc | 1 + .gitignore | 2 + Cargo.lock | 7 ++ Cargo.toml | 4 + flake.lock | 264 ++++++++++++++++++++++++++++++++++++++++++++++++++++ flake.nix | 32 +++++++ src/main.rs | 3 + 7 files changed, 313 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..acf271d --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/result +/.direnv diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..bae7aae --- /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 = "musikquadrupled" +version = "0.1.0" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..fbdeefa --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,4 @@ +[package] +name = "musikquadrupled" +version = "0.1.0" +edition = "2021" diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..6729237 --- /dev/null +++ b/flake.lock @@ -0,0 +1,264 @@ +{ + "nodes": { + "crane": { + "flake": false, + "locked": { + "lastModified": 1670900067, + "narHash": "sha256-VXVa+KBfukhmWizaiGiHRVX/fuk66P8dgSFfkVN4/MY=", + "owner": "ipetkov", + "repo": "crane", + "rev": "59b31b41a589c0a65e4a1f86b0e5eac68081468b", + "type": "github" + }, + "original": { + "owner": "ipetkov", + "repo": "crane", + "type": "github" + } + }, + "dream2nix": { + "inputs": { + "all-cabal-json": [ + "nci" + ], + "crane": "crane", + "devshell": [ + "nci" + ], + "drv-parts": "drv-parts", + "flake-compat": "flake-compat", + "flake-parts": [ + "nci", + "parts" + ], + "flake-utils-pre-commit": [ + "nci" + ], + "ghc-utils": [ + "nci" + ], + "gomod2nix": [ + "nci" + ], + "mach-nix": [ + "nci" + ], + "nix-pypi-fetcher": [ + "nci" + ], + "nixpkgs": [ + "nci", + "nixpkgs" + ], + "nixpkgsV1": "nixpkgsV1", + "poetry2nix": [ + "nci" + ], + "pre-commit-hooks": [ + "nci" + ], + "pruned-racket-catalog": [ + "nci" + ] + }, + "locked": { + "lastModified": 1680605243, + "narHash": "sha256-dUrxj653kcLvjNKRI7NoTJoj+Q7G+vOYsl4iuwtnIWo=", + "owner": "nix-community", + "repo": "dream2nix", + "rev": "34a80ab215f1f24068ea9c76f3a7e5bc19478653", + "type": "github" + }, + "original": { + "owner": "nix-community", + "repo": "dream2nix", + "type": "github" + } + }, + "drv-parts": { + "inputs": { + "flake-compat": [ + "nci", + "dream2nix", + "flake-compat" + ], + "flake-parts": [ + "nci", + "dream2nix", + "flake-parts" + ], + "nixpkgs": [ + "nci", + "dream2nix", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1680172861, + "narHash": "sha256-QMyI338xRxaHFDlCXdLCtgelGQX2PdlagZALky4ZXJ8=", + "owner": "davhau", + "repo": "drv-parts", + "rev": "ced8a52f62b0a94244713df2225c05c85b416110", + "type": "github" + }, + "original": { + "owner": "davhau", + "repo": "drv-parts", + "type": "github" + } + }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1673956053, + "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", + "owner": "edolstra", + "repo": "flake-compat", + "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", + "type": "github" + }, + "original": { + "owner": "edolstra", + "repo": "flake-compat", + "type": "github" + } + }, + "mk-naked-shell": { + "flake": false, + "locked": { + "lastModified": 1681286841, + "narHash": "sha256-3XlJrwlR0nBiREnuogoa5i1b4+w/XPe0z8bbrJASw0g=", + "owner": "yusdacra", + "repo": "mk-naked-shell", + "rev": "7612f828dd6f22b7fb332cc69440e839d7ffe6bd", + "type": "github" + }, + "original": { + "owner": "yusdacra", + "repo": "mk-naked-shell", + "type": "github" + } + }, + "nci": { + "inputs": { + "dream2nix": "dream2nix", + "mk-naked-shell": "mk-naked-shell", + "nixpkgs": [ + "nixpkgs" + ], + "parts": "parts", + "rust-overlay": "rust-overlay" + }, + "locked": { + "lastModified": 1681711895, + "narHash": "sha256-/EeP+RRIw68/0C7CaOAElYQ2pXZAQCWnnU/qjO8OKKM=", + "owner": "yusdacra", + "repo": "nix-cargo-integration", + "rev": "cee5dba8ca34ccb0829ae3812d23afbea1fd9d5d", + "type": "github" + }, + "original": { + "owner": "yusdacra", + "repo": "nix-cargo-integration", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1681648924, + "narHash": "sha256-pzi3HISK8+7mpEtv08Yr80wswyHKsz+RP1CROG1Qf6s=", + "owner": "nixos", + "repo": "nixpkgs", + "rev": "f294325aed382b66c7a188482101b0f336d1d7db", + "type": "github" + }, + "original": { + "owner": "nixos", + "ref": "nixos-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "nixpkgsV1": { + "locked": { + "lastModified": 1678500271, + "narHash": "sha256-tRBLElf6f02HJGG0ZR7znMNFv/Uf7b2fFInpTHiHaSE=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "5eb98948b66de29f899c7fe27ae112a47964baf8", + "type": "github" + }, + "original": { + "id": "nixpkgs", + "ref": "nixos-22.11", + "type": "indirect" + } + }, + "parts": { + "inputs": { + "nixpkgs-lib": [ + "nci", + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1680392223, + "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "parts_2": { + "inputs": { + "nixpkgs-lib": [ + "nixpkgs" + ] + }, + "locked": { + "lastModified": 1680392223, + "narHash": "sha256-n3g7QFr85lDODKt250rkZj2IFS3i4/8HBU2yKHO3tqw=", + "owner": "hercules-ci", + "repo": "flake-parts", + "rev": "dcc36e45d054d7bb554c9cdab69093debd91a0b5", + "type": "github" + }, + "original": { + "owner": "hercules-ci", + "repo": "flake-parts", + "type": "github" + } + }, + "root": { + "inputs": { + "nci": "nci", + "nixpkgs": "nixpkgs", + "parts": "parts_2" + } + }, + "rust-overlay": { + "flake": false, + "locked": { + "lastModified": 1681697975, + "narHash": "sha256-47DFtN5PX05eD8ObImkSu2W0hyyZ5cK1Tl9EvmW2NnU=", + "owner": "oxalica", + "repo": "rust-overlay", + "rev": "ffe47b90076067ad5dc25fe739d95a463bdf3c59", + "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..d519c93 --- /dev/null +++ b/flake.nix @@ -0,0 +1,32 @@ +{ + inputs.nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; + inputs.nci.url = "github:yusdacra/nix-cargo-integration"; + inputs.nci.inputs.nixpkgs.follows = "nixpkgs"; + inputs.parts.url = "github:hercules-ci/flake-parts"; + inputs.parts.inputs.nixpkgs-lib.follows = "nixpkgs"; + + outputs = inputs @ { + parts, + nci, + ... + }: + parts.lib.mkFlake {inherit inputs;} { + systems = ["x86_64-linux"]; + imports = [nci.flakeModule]; + perSystem = { + pkgs, + config, + ... + }: let + crateName = "musikquadrupled"; + crateOutputs = config.nci.outputs.${crateName}; + in { + nci.projects.${crateName}.relPath = ""; + nci.crates.${crateName} = { + export = true; + }; + devShells.default = crateOutputs.devShell; + packages.default = crateOutputs.packages.release; + }; + }; +} 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!"); +}