diff --git a/packages/hello-world.nix b/packages/hello-world.nix index 53b8173..0b6c05d 100644 --- a/packages/hello-world.nix +++ b/packages/hello-world.nix @@ -1,22 +1,22 @@ -{ stdenv }: +{ lib, stdenv }: stdenv.mkDerivation { pname = "hello-world"; version = "1.0.0"; - src = builtins.fetchurl { - url = "https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/tools/hello/hello.c"; - sha256 = "1p9sc9h1b6k7bk25n5g0w9gwy6fxlkchr5hpmxczg4bvp6jv93q6"; - }; + dontUnpack = true; installPhase = '' mkdir -p $out/bin - cp $src $out/bin/hello-world + cat > $out/bin/hello-world <<'SCRIPT' + #!/bin/sh + echo "Hello, world!" +SCRIPT chmod +x $out/bin/hello-world ''; - meta = with stdenv.lib; { - description = "A tiny hello‑world program used as an example package"; + meta = with lib; { + description = "A tiny hello-world program used as an example package"; license = licenses.bsd2; platforms = platforms.unix; }; diff --git a/packages/xonsh.nix b/packages/xonsh.nix index dcf90cc..2a4a9be 100644 --- a/packages/xonsh.nix +++ b/packages/xonsh.nix @@ -1,4 +1,4 @@ -{ python3Packages }: +{ lib, python3Packages }: python3Packages.buildPythonPackage rec { pname = "xonsh"; @@ -21,9 +21,9 @@ python3Packages.buildPythonPackage rec { doCheck = false; - meta = { + meta = with lib; { description = "Python-powered shell that combines Python with shell features"; homepage = "https://xon.sh"; - license = python3Packages.setuptools.meta.bsd3 or python3Packages.setuptools.meta.license; + license = licenses.bsd3; }; }