From c514fc7b22eabba3802146f3cbf004384d015540 Mon Sep 17 00:00:00 2001 From: Erica Marigold Date: Sun, 9 Feb 2025 17:16:31 +0000 Subject: [PATCH] chore(nix): apply formatting with `nixpkgs-fmt` --- dev.nix | 44 +++++++++++++++++++++++--------------------- flake.nix | 3 ++- 2 files changed, 25 insertions(+), 22 deletions(-) diff --git a/dev.nix b/dev.nix index da2adb2..0e2a8b0 100644 --- a/dev.nix +++ b/dev.nix @@ -1,33 +1,35 @@ -{ pkgs ? import {} }: +{ pkgs ? import { } }: pkgs.mkShell { buildInputs = [ pkgs.curl pkgs.git pkgs.lune - (let version = "6.0-28"; in pkgs.stdenv.mkDerivation { - name = "unzip-${version}"; - src = pkgs.fetchurl { - url = "http://ftp.debian.org/debian/pool/main/u/unzip/unzip_${version}_amd64.deb"; - sha256 = "13h6cm4708p5zczi7fc4qbdlwl1nhnhrk0ncwv9chb1q6jf55ndk"; - }; + ( + let version = "6.0-28"; in pkgs.stdenv.mkDerivation { + name = "unzip-${version}"; + src = pkgs.fetchurl { + url = "http://ftp.debian.org/debian/pool/main/u/unzip/unzip_${version}_amd64.deb"; + sha256 = "13h6cm4708p5zczi7fc4qbdlwl1nhnhrk0ncwv9chb1q6jf55ndk"; + }; - buildInputs = [ pkgs.binutils pkgs.gnutar pkgs.bzip2 pkgs.pkg-config ]; + buildInputs = [ pkgs.binutils pkgs.gnutar pkgs.bzip2 pkgs.pkg-config ]; - unpackPhase = '' - mkdir -p tmp/ - ar x $src - mv data.tar.xz tmp/ - ''; + unpackPhase = '' + mkdir -p tmp/ + ar x $src + mv data.tar.xz tmp/ + ''; - installPhase = '' - mkdir -p $out/bin $out/lib - tar -xf ./tmp/data.tar.xz -C $out - mv $out/usr/bin/unzip $out/bin/ - cp $(pkg-config --variable=libdir bzip2)/libbz2.so.1.0.8 $out/lib/libbz2.so.1.0 - rm -rf $out/usr tmp/ - ''; - }) + installPhase = '' + mkdir -p $out/bin $out/lib + tar -xf ./tmp/data.tar.xz -C $out + mv $out/usr/bin/unzip $out/bin/ + cp $(pkg-config --variable=libdir bzip2)/libbz2.so.1.0.8 $out/lib/libbz2.so.1.0 + rm -rf $out/usr tmp/ + ''; + } + ) ]; shellHook = '' diff --git a/flake.nix b/flake.nix index 2ff65a4..6fbe5f9 100644 --- a/flake.nix +++ b/flake.nix @@ -11,7 +11,8 @@ devpkgs = import ./dev.nix { inherit pkgs; }; - in { + in + { packages.${system}.devShell = devpkgs; defaultPackage.${system} = devpkgs; };