Skip to content

Commit

Permalink
update flake
Browse files Browse the repository at this point in the history
  • Loading branch information
0xhenrique committed May 24, 2024
1 parent 1600909 commit fbb6d99
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 103 deletions.
4 changes: 2 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
BOOKMARK_PATH="assets/"
OWNER=
BOOKMARK_PATH="assets/lum-marker.json"
OWNER=user
4 changes: 0 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

Expand Down
89 changes: 89 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion assets/lum-marker.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"owner":"admin","created_at":1714182655,"bookmarks":[{"title":"【original anime MV】SHINKIRO【hololive/宝鐘マリン・Gawr Gura】","link":"https://www.youtube.com/watch?v=9ehwhQJ50gs"},{"title":"【MV】Lucky☆Orb feat. Hatsune Miku by emon(Tes.) / ラッキー☆オーブ feat. 初音ミク by emon(Tes.) 【MIKU EXPO 5th】","link":"https://www.youtube.com/watch?v=AufydOsiD6M"},{"title":"【MV】White Love/SPEED (Cover)【FUWAMOCO】","link":"https://www.youtube.com/watch?v=D8YflSQi1Vk"},{"title":"Re:Zero ED / Ending 2 Full『Emilia (Rie Takahashi) - Stay Alive』【ENG Sub】","link":"https://www.youtube.com/watch?v=z-NuxWkYtlI"},{"title":"arrays and vectors in rust (btw)","link":"https://www.cs.brandeis.edu/~cs146a/rust/doc-02-21-2015/book/arrays-vectors-and-slices.html"},{"title":"lambda expressions","link":"https://www.gnu.org/software/emacs/manual/html_node/eintr/lambda.html"}]}
{"owner":"admin","created_at":1714182655,"bookmarks":[{"title":"【original anime MV】SHINKIRO【hololive/宝鐘マリン・Gawr Gura】","link":"https://www.youtube.com/watch?v=9ehwhQJ50gs"},{"title":"【MV】Lucky☆Orb feat. Hatsune Miku by emon(Tes.) / ラッキー☆オーブ feat. 初音ミク by emon(Tes.) 【MIKU EXPO 5th】","link":"https://www.youtube.com/watch?v=AufydOsiD6M"},{"title":"【MV】White Love/SPEED (Cover)【FUWAMOCO】","link":"https://www.youtube.com/watch?v=D8YflSQi1Vk"},{"title":"arrays and vectors in rust (btw)","link":"https://www.cs.brandeis.edu/~cs146a/rust/doc-02-21-2015/book/arrays-vectors-and-slices.html"},{"title":"lambda expressions","link":"https://www.gnu.org/software/emacs/manual/html_node/eintr/lambda.html"}]}
89 changes: 44 additions & 45 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

72 changes: 21 additions & 51 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,61 +1,31 @@
# This flake was initially generated by fh, the CLI for FlakeHub (version 0.1.8)
{
# A helpful description of your flake
description = "LUM: Linux Ubiquitous Marker";
description = "LUM - Linux Ubiquitous Marker";

# Flake inputs
inputs = {
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";

nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";

rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
};

# Flake outputs that other flakes can use
outputs = { self, flake-schemas, nixpkgs, rust-overlay }:
let
# Nixpkgs overlays
overlays = [
rust-overlay.overlays.default
(final: prev: {
rustToolchain = final.rust-bin.stable.latest.default;
})
];
outputs = { self, flake-utils, naersk, nixpkgs }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = (import nixpkgs) {
inherit system;
};

# Helpers for producing system-specific outputs
supportedSystems = [ "x86_64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit overlays system; };
});
in {
# Schemas tell Nix about the structure of your flake's outputs
schemas = flake-schemas.schemas;
naersk' = pkgs.callPackage naersk {};

# Development environments
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
# Pinned packages available in the environment
packages = with pkgs; [
rustToolchain
cargo-bloat
cargo-edit
cargo-outdated
cargo-udeps
cargo-watch
rust-analyzer
git
nixpkgs-fmt
];
in rec {
# For `nix build` & `nix run`:
defaultPackage = naersk'.buildPackage {
src = ./.;
};

# Environment variables
env = {
RUST_BACKTRACE = "1";
};
# For `nix develop` (optional, can be skipped):
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo ];
};
});
};
}
);
}

0 comments on commit fbb6d99

Please sign in to comment.