nixpkgs/pkgs/by-name/mu/muonlang/package.nix
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

35 lines
888 B
Nix

{ stdenv, lib, fetchFromGitHub, makeWrapper }:
stdenv.mkDerivation rec {
pname = "muon";
version = "2019-11-27";
src = fetchFromGitHub {
owner = "nickmqb";
repo = pname;
rev = "6d3a5054ae75b0e5a0ae633cf8cbc3e2a054f8b3";
sha256 = "1sb1i08421jxlx791g8nh4l239syaj730hagkzc159g0z65614zz";
};
nativeBuildInputs = [ makeWrapper ];
buildPhase = ''
mkdir -p $out/bin $out/share/mu
cp -r lib $out/share/mu
${stdenv.cc.targetPrefix}cc -o $out/bin/mu-unwrapped bootstrap/mu64.c
'';
installPhase = ''
makeWrapper $out/bin/mu-unwrapped $out/bin/mu \
--add-flags $out/share/mu/lib/core.mu
'';
meta = with lib; {
description = "Modern low-level programming language";
homepage = "https://github.com/nickmqb/muon";
license = licenses.mit;
maintainers = with maintainers; [ Br1ght0ne ];
platforms = platforms.all;
};
}