aboutsummaryrefslogtreecommitdiffstats
path: root/flake.nix
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-21 10:49:23 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-21 11:28:43 +0200
commit1debeb77f7986de1b659dcfdc442de6415e1d9f5 (patch)
tree4df3e7c3f6a2d1ec116e4088c5ace7f143a8b05f /flake.nix
downloadyt-1debeb77f7986de1b659dcfdc442de6415e1d9f5.zip
chore: Initial Commit
This repository was migrated out of my nixos-config.
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix76
1 files changed, 76 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
new file mode 100644
index 0000000..5413444
--- /dev/null
+++ b/flake.nix
@@ -0,0 +1,76 @@
+# yt - A fully featured command line YouTube client
+#
+# Copyright (C) 2024 Benedikt Peetz <benedikt.peetz@b-peetz.de>
+# SPDX-License-Identifier: GPL-3.0-or-later
+#
+# This file is part of Yt.
+#
+# You should have received a copy of the License along with this program.
+# If not, see <https://www.gnu.org/licenses/gpl-3.0.txt>.
+{
+ description = "yt";
+
+ 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 = nixpkgs.legacyPackages."${system}";
+
+ python = pkgs.python3.withPackages (ps:
+ with ps; [
+ yt-dlp
+ ]);
+
+ buildInputs = with pkgs; [
+ mpv-unwrapped.dev
+ ];
+
+ nativeBuildInputs = with pkgs; [
+ llvmPackages_latest.clang-unwrapped.lib
+ ];
+ in {
+ devShells.default = pkgs.mkShell {
+ env = let
+ clang_version =
+ pkgs.lib.versions.major
+ pkgs.llvmPackages_latest.clang-unwrapped.version;
+ in {
+ FFMPEG_LOCATION = "${pkgs.lib.getExe pkgs.ffmpeg}";
+ LIBCLANG_PATH = "${pkgs.llvmPackages_latest.clang-unwrapped.lib}/lib/libclang.so";
+ LIBCLANG_INCLUDE_PATH = "${pkgs.llvmPackages_latest.clang-unwrapped.lib}/lib/clang/${clang_version}/include";
+ C_INCLUDE_PATH = "${pkgs.glibc.dev}/include";
+ };
+
+ inherit buildInputs nativeBuildInputs;
+
+ packages = with pkgs; [
+ # rust stuff
+ cargo
+ clippy
+ rustc
+ rustfmt
+ mold-wrapped
+
+ reuse
+ cocogitto
+
+ sqlx-cli
+ sqlite-interactive
+
+ python
+ jq
+
+ cargo-edit
+ cargo-expand
+ cargo-flamegraph
+ ];
+ };
+ }));
+}