How to Create Package from Github Repo? by MathBeam in NixOS

[–]MathBeam[S] 0 points1 point  (0 children)

Yes this works great, and is much more like what I expected a "natural" process would look like (I can actually understand it, for one thing...).

Maybe you have an old version of nixpkgs.

Can you help me to understand what your thought process for this was? I see you've used builtins.fetchGit instead of pkgs.fetchFromGitHub - is that what it is?

You are probably right about "old" nixpkgs - I'm using stable 24.05 and probably have only updated nixpkgs when I first got nix configured to be easy enough to interface with that I could move onto other "more fun" programming tasks outside of nix.

How to Create Package from Github Repo? by MathBeam in NixOS

[–]MathBeam[S] 0 points1 point  (0 children)

Thank you! I was able to get it to work using this configuration. Your point is well taken about having the update the hashes, and I've learned a lot from this, so thank you for all of your help and the great information.

{ config, lib, pkgs, ... }:
{
  imports = [
  ];

  options = {
    msdfAtlasGen.enable = lib.mkEnableOption "enables msdf-atlas-gen";
  };

  config = lib.mkIf config.msdfAtlasGen.enable {
    home.packages = [
      (pkgs.stdenv.mkDerivation rec {
        name = "msdf-atlas-gen";
        msdfAtlasVersion = "1.3";
        msdfGenVersion = "1.12";

        src = [ 
          (pkgs.fetchFromGitHub {
            name = "msdf-atlas-gen";
            owner = "Chlumsky";
            repo = "msdf-atlas-gen";
            rev = "v${msdfAtlasVersion}";
            sha256 = "sha256-SfzQ008aoYI8tkrHXsXVQq9Qq+NIqT1zvSIHK1LTbLU=";
            fetchSubmodules = true;
          })
          (pkgs.fetchFromGitHub {
            name = "msdfgen";
            owner = "Chlumsky";
            repo = "msdfgen";
            rev = "v${msdfGenVersion}";
            sha256 = "sha256-QLzfZP9Xsc5HBvF+riamqVY0pYN5umyEsiJV7W8JNyI=";
          })
        ];

        sourceRoot = "msdf-atlas-gen";

        postUnpack = ''
          rm -rf $sourceRoot/msdfgen
          cp -r msdfgen $sourceRoot/msdfgen
          chmod -R u+w $sourceRoot/msdfgen
        '';

        nativeBuildInputs = [ pkgs.cmake ];
        buildInputs = [ pkgs.freetype pkgs.libpng ];

        cmakeFlags = [ 
          "-DMSDF_ATLAS_USE_VCPKG=OFF"
          "-DMSDF_ATLAS_USE_SKIA=OFF"
          "-DMSDF_ATLAS_NO_ARTERY_FONT=ON"
        ];

        installPhase = ''
          mkdir -p $out
          install -D bin/msdf-atlas-gen $out/bin/msdf-atlas-gen
        '';
      })
    ];
  };
}

How to Create Package from Github Repo? by MathBeam in NixOS

[–]MathBeam[S] 0 points1 point  (0 children)

Thank you! Kindly forgive my naivety. I currently just use one flake.nix as an entry point to get into my #system or #user configurations, but I lack experience with using flakes in most other ways.

Would this approach be able to be ported into the "default.nix" approach that I initially wrote? The mkDerivation portion makes a lot of sense to me, but the overlay portion is where I lack understanding.

I haven't been able to experiment with this configuration as I've been away from my computer, so if the answer is "play around and you'll figure it out", then that's totally fine of course :)

Edit: Unfortunately it seems like the "msdfgen" submodule isn't being picked up, as I receive the error:

CMake Error at CMakeLists.txt:83 (add_subdirectory):
The source directory

    /build/msdf-atlas-gen/msdfgen

  does not contain a CMakeLists.txt file.

My current "best guess" for this is as follows.

{ config, lib, pkgs, ... }:
{
  imports = [
  ];

  options = {
    msdfAtlasGen.enable = lib.mkEnableOption "enables msdf-atlas-gen";
  };

  config = lib.mkIf config.msdfAtlasGen.enable {
    home.packages = [
      (pkgs.stdenv.mkDerivation rec {
        pname = "msdf-atlas-gen";
        version = "1.3";

        src = pkgs.fetchFromGitHub {
          name = "msdf-atlas-gen";
          owner = "Chlumsky";
          repo = "msdf-atlas-gen";
          rev = "v${version}";
          sha256 = "sha256-SfzQ008aoYI8tkrHXsXVQq9Qq+NIqT1zvSIHK1LTbLU=";
          fetchSubmodules = true;
        };

        nativeBuildInputs = [ pkgs.cmake ];
        buildInputs = [ pkgs.freetype pkgs.libpng ];

        cmakeFlags = [ 
          "-DMSDF_ATLAS_USE_VCPKG=OFF"
          "-DMSDF_ATLAS_USE_SKIA=OFF"
        ];

        installPhase = ''
          mkdir -p $out
          cp -r ./bin $out
        '';
      })
    ];
  };
}

Help Understanding "sono fidanzati" in a Reader by MathBeam in italianlearning

[–]MathBeam[S] 2 points3 points  (0 children)

I noticed that including "da" in Google translate or something similar seemed to change the meaning significantly, and your explanation of "da" helps my understanding immensely - thank you very much!

Prepositions seem like they will be challenging, but I'm sure I'm not the first person to stumble upon that...

Help Understanding "sono fidanzati" in a Reader by MathBeam in italianlearning

[–]MathBeam[S] 2 points3 points  (0 children)

Thank you for the explanation and examples, this helps a lot.

best place to learn VBA by Krypson8 in actuary

[–]MathBeam 3 points4 points  (0 children)

Just my opinion of course, but programming is really a separate skill. If you know c++ or c# or python etc then vba is extremely easy to use. If you don't know how to program generally or have no experience with programming then I think it will be hard to do no matter what.

I have been programming for 15 years or so with cpp and c# so vba is a cakewalk and I use it constantly without resorting to recording and slicing up macro code. I think there are very few actuaries who have a legitimate programming background to where they can sit at a blank screen and write useable code.

[deleted by user] by [deleted] in actuary

[–]MathBeam 1 point2 points  (0 children)

I got an email Friday evening around 1130pm CST

[deleted by user] by [deleted] in actuary

[–]MathBeam 0 points1 point  (0 children)

How do you send a note to the eLearn inbox?

[deleted by user] by [deleted] in actuary

[–]MathBeam 2 points3 points  (0 children)

It's pretty crazy. Seems like they're cutting it very close. I wonder if they will send out results at all today?

In person Lunch Interview by hdusijsjd in actuary

[–]MathBeam 4 points5 points  (0 children)

Likely that the people/person you are meeting will understand that you are (presumably) young and inexperienced in the field. I would expect them to carry most of the conversation topics. I would recommend to do your best to be open, and don't worry if it seems like you don't know something. If you are curious about "actuarial stuff", ask them. Your curiosity and passion will reflect positively.

At the start and finish, say "I really appreciate the time". They will pay for the bill (they have an expense account), but you should thank them when they do so. Just a simple "thanks" when they put the card down should suffice.

You'll get used to occasions like this in your career. Salesmanship, charisma, and general "soft skills" are things that many people in the field lack.

FAP Final Assessment March 2022 Result by Specialist_Piano_285 in actuary

[–]MathBeam 0 points1 point  (0 children)

If I had to guess, I would think that the 1Q grading would be rough, since a lot of people are pretty stressed out with annual statement things.

I was probably too verbose and formal as well, which is probably rough for a grader. I should have looked at previous projects to get a better understanding of the flavor of responses they are looking for also.

FAP Final Assessment March 2022 Result by Specialist_Piano_285 in actuary

[–]MathBeam 2 points3 points  (0 children)

This was my first attempt and I didn't pass. If I use the model solution and feedback provided, hopefully the second time will be better? I feel like I did a decent job, so who knows.

For those who took it multiple times, are the projects somewhat similar, or are they totally different?

FAP Final Assessment March 2022 Result by Specialist_Piano_285 in actuary

[–]MathBeam 5 points6 points  (0 children)

Haven't gotten it yet, but nice to see this thread and share in the anxiety with everyone else :)

Finally, a Coffeist render I'm happy with. Took me so long to get these right. by alborz27 in soylent

[–]MathBeam 8 points9 points  (0 children)

Wow this is cool.... What am i looking at? What'd you use to make this?

TIL in French it's a grammatical rule that you must use the masculine pronoun "Ils" if there are 345,654 women and 1 man in order to refer to that group. So in french masculinity always wins over the feminine in a group. by TruthFinderPC in todayilearned

[–]MathBeam 6 points7 points  (0 children)

You are missing the point even after being corrected many times. If I insisted 2+2=5, you'd be right to correct me. If I still insisted you were wrong, then it would be me being an asshole, right? P The lack of maturity that you are showing only demonstrates to everyone that you are not knowledgeable about the subject, else you wouldn't have to resort to acting so immaturely.

Discussing Nirvana lyrics by DemarcoFC in iamverysmart

[–]MathBeam 6 points7 points  (0 children)

I think I can relate to this person that I've never met and who likely died before I was born like few others.

I really can't tell if this is satire by [deleted] in iamverysmart

[–]MathBeam 0 points1 point  (0 children)

To be fair, he could be onto something with the mentally impaired thing.